/* ===================================================
   VARIABLES DE COLOR Y ESTILOS BASE (Azul más fuerte)
   =================================================== */
:root {
    --bg-color: #EDE8D0;
    --main-color: #3F637D; /* Azul más fuerte y visible para mayor contraste */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--main-color);
    font-family: var(--font-sans);
    line-height: 1.6;
}

/* ===================================================
   ENCABEZADO / NAVEGACIÓN RESPONSIVE
   =================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 2px solid var(--main-color);
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 100;
    flex-wrap: wrap;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.nav a {
    color: var(--main-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.nav a:hover {
    opacity: 0.7;
}

/* ===================================================
   HERO / INICIO CON LOGO ANIMADO
   =================================================== */
.hero-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
    border-bottom: 2px solid var(--main-color);
}

.logo-container {
    width: 100%;
    max-width: 380px;
    height: 250px;
    margin-bottom: 20px;
}

.book-logo {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.thin-line {
    fill: none;
    stroke: var(--main-color);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-curve {
    fill: none;
    stroke: var(--main-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.letter-curve {
    fill: none;
    stroke: var(--main-color);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.brand-calligraphy {
    fill: var(--main-color);
    font-family: 'Cormorant Garamond', 'Brush Script MT', cursive, serif;
    font-size: 82px;
    font-weight: 700;
    font-style: italic;
    text-anchor: middle;
    letter-spacing: -1px;
}

@keyframes emergeFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-9px) scale(1.02); }
}

@keyframes gentlePulse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.floating-text {
    transform-origin: center;
    animation: emergeFloat 5s ease-in-out infinite;
}

.floating-pages {
    transform-origin: center;
    animation: gentlePulse 6s ease-in-out infinite 0.4s;
}

.page-left-1, .page-right-1 { animation: gentlePulse 5s ease-in-out infinite 0.2s; }
.page-left-2, .page-right-2 { animation: gentlePulse 5.5s ease-in-out infinite 0.5s; }

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    max-width: 750px;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    max-width: 650px;
    margin-bottom: 30px;
    font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    background-color: transparent;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
}

/* ===================================================
   SECCIONES GENERALES
   =================================================== */
.section {
    padding: 70px 6%;
    border-bottom: 2px solid var(--main-color);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 45px;
}

/* Servicios */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    border: 2px solid var(--main-color);
    padding: 35px 25px;
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.project-card {
    border: 2px solid var(--main-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover { transform: translateY(-5px); }

.project-image-container {
    width: 100%;
    height: 280px;
    border-bottom: 2px solid var(--main-color);
    overflow: hidden;
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info { padding: 20px; }

.project-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Galería y Lightbox */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 240px;
    border: 2px solid var(--main-color);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(63, 99, 125, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: var(--bg-color);
    border: 2px solid var(--bg-color);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(237, 232, 208, 0.96);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border: 2px solid var(--main-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.lightbox-caption {
    margin-top: 15px;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--main-color);
}

.lightbox-close {
    position: absolute;
    top: 25px; right: 35px;
    font-size: 2.5rem;
    color: var(--main-color);
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    font-size: 1.5rem;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ===================================================
   ESTILOS SECCIÓN SOBRE MÍ (CON FOTO)
   =================================================== */
.about-section {
    background-color: rgba(63, 99, 125, 0.04);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-photo-wrapper {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    margin: 0 auto;
    border: 2px solid var(--main-color);
    padding: 8px;
    background-color: var(--bg-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.about-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-text-content {
    flex: 2;
    min-width: 280px;
}

.about-intro {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.about-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-list li {
    position: relative;
    padding-left: 25px;
    font-size: 1rem;
}

.about-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--main-color);
    font-weight: bold;
}

/* Proceso Pasos */
.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 260px;
    border-left: 2px solid var(--main-color);
    padding-left: 20px;
}

.step-num {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    opacity: 0.7;
}

.step h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

/* ===================================================
   ESTILOS SECCIÓN CONTACTO Y UBICACIÓN
   =================================================== */
.contact-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    margin-bottom: 35px;
    font-size: 1.05rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 2px solid var(--main-color);
    padding: 35px 30px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(63, 99, 125, 0.4);
    padding-bottom: 15px;
    text-align: left;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.contact-value {
    color: var(--main-color);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.address-text {
    font-size: 1.1rem;
    text-align: right;
    line-height: 1.4;
}

.contact-value:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.map-btn-container {
    margin-top: 30px;
}

/* Pie de página */
.footer {
    padding: 30px 6%;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Ajustes Responsive Avanzados */
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 12px; text-align: center; }
    .nav { justify-content: center; gap: 10px; }
    .contact-item { flex-direction: column; gap: 6px; text-align: center; }
    .address-text { text-align: center; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}