/*
Theme Name: casi listo
Description: Tema minimalista para Barrio Náutico El Ciervo
Version: 7
Author: CECI
*/

/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* COLORES DE MARCA */
:root {
    --brand: #116B6A;
    --brand-light: #1a8a88;
    --brand-dark: #0d5554;
    --light: #f0e5d8;
    --accent: #284d84;
    --earth: #9b6c55;
    --dark: #333;
    --gray: #666;
}

/* TIPOGRAFÍA */
body {
    font-family: Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--brand);
    margin-bottom: 1rem;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--earth);
}

/* CONTENEDOR */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   HEADER - NAVBAR FIJO ARRIBA
   ================================ */

/* Header principal - transparente y FIJO */
.site-header,
#masthead {
    background-color: rgba(17, 107, 106, 0.5) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 0 !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Container del header */
.site-header .container,
#masthead .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

/* Branding y logo */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    max-width: none;
    transition: transform 0.3s ease;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.site-logo:hover {
    transform: scale(1.05);
    text-decoration: none !important;
}

/* Título del sitio - sin cortes */
.site-title {
    color: white !important;
    margin: 0 !important;
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: visible;
    line-height: 1.2;
    display: block;
}

.site-title a,
.site-title a:hover,
.site-title a:focus,
.site-title a:active,
.site-title a:visited {
    color: white !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

/* Ajuste específico para escritorio */
@media (min-width: 769px) {
    .site-branding {
        min-width: 300px;
        flex: 0 0 auto;
    }
    
    .site-title {
        font-size: 1.6rem;
    }
}

/* Logo personalizado */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo-link img,
.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Navegación principal */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: white !important;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    display: block;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: white !important;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s, height 0.3s;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.nav-menu a:hover::before {
    width: 100%;
    height: 100%;
}

/* Menú móvil - botón hamburguesa */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    position: absolute;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

.menu-toggle.active .menu-icon {
    background: transparent;
}

.menu-toggle.active .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .menu-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ================================
   CONTENIDO PRINCIPAL
   ================================ */

/* El contenido debe empezar desde arriba (debajo del header fijo) */
#main-content,
.main-content {
    margin-top: 0;
    padding-top: 0;
}

.site-main {
    padding: 40px 0;
    min-height: 60vh;
}

/* POSTS */
.post {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.entry-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.entry-meta {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
}

.entry-content {
    line-height: 1.8;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 20px 0;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: var(--brand);
    color: var(--light);
    border-radius: 5px;
    margin-top: 15px;
}

.read-more:hover {
    background: var(--earth);
    color: var(--light);
}

/* SIDEBAR */
.sidebar {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 25px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand);
}

/* LAYOUT 2 COLUMNAS */
.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* FOOTER */
.site-footer {
    background: var(--brand);
    color: var(--light);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.site-footer a {
    color: var(--light);
}

.site-footer a:hover {
    color: var(--earth);
}

/* FORMULARIOS */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
}

button,
input[type="submit"] {
    background: var(--brand);
    color: var(--light);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

button:hover,
input[type="submit"]:hover {
    background: var(--earth);
}

/* PAGINACIÓN */
.posts-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.posts-navigation a {
    padding: 10px 20px;
    background: var(--brand);
    color: var(--light);
    border-radius: 5px;
}

.posts-navigation a:hover {
    background: var(--earth);
}

/* BOTÓN BACK TO TOP */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top:hover {
    background: var(--brand-light);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(17, 107, 106, 0.4);
}

/* ================================
   RESPONSIVE
   ================================ */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) and (min-width: 769px) {
    .site-title {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 0.3rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    /* Header móvil */
    .site-header .container,
    #masthead .container {
        position: relative;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .custom-logo-link img,
    .custom-logo {
        max-height: 35px;
    }
    
    /* Navegación móvil */
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(17, 107, 106, 0.95);
        backdrop-filter: blur(10px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }
    
    .main-navigation.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 500px;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        width: 100%;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 1rem;
        display: block;
        width: 100%;
        font-size: 1rem;
    }
    
    /* Layout móvil */
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .post {
        padding: 20px;
    }
    
    .site-main {
        padding: 20px 0;
    }
}