:root {
    --primary-font: 'Montserrat', sans-serif;
    --secondary-font: 'Playfair Display', serif;
    --dark-color: #2c2c2c;
    --light-color: #f4f4f4;
    --white-color: #ffffff;
    --gray-color: #888;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    color: var(--dark-color);
}

a {
    text-decoration: none;
    color: var(--dark-color);
}

h1, h2, h3 {
    font-family: var(--secondary-font);
    font-weight: 500;
}

/* ======== HEADER Y NAVEGACIÓN ======== */
header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0; /* Posición inicial visible */
    transition: top 0.8s ease-in-out; /* Transición en la propiedad top */
}

header.header-hidden {
    top: -100px; /* Oculta el header completamente hacia arriba */
}

header .logo a {
    font-family: var(--secondary-font);
    font-size: 1.5rem;
    font-weight: 500;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

header nav a {
    font-weight: 500;
    transition: color 0.3s;
}

header nav a:hover {
    color: var(--gray-color);
}

/* ======== SECCIÓN HERO ======== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
    /* CAMBIA ESTA IMAGEN DE FONDO POR TU MEJOR PROYECTO */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('PaginaWeb/Foto Stipa Estudio Presentación.jpg') no-repeat center center/cover;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    font-weight: 300;
}

/* ======== ESTILOS DE SECCIÓN GENERALES ======== */
.section {
    padding: 6rem 5%;
}

.section.bg-light {
    background-color: var(--light-color);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* ======== SECCIÓN ESTUDIO ======== */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.about-text {
    flex: 1.2;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: #555;
}

/* ======== SECCIÓN PORTAFOLIO ======== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white-color);
    padding: 2rem 1.5rem 1.5rem;
    transition: opacity 0.4s ease;
}

.portfolio-caption h3 {
    font-size: 1.5rem;
}

/* ======== SECCIÓN SERVICIOS ======== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.service-card {
    padding: 2rem;
    border: 1px solid #ddd;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ======== SECCIÓN CONTACTO ======== */
.contact-container {
    display: flex;
    gap: 3rem;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin-bottom: 1.5rem;
}

.contact-info a {
    font-weight: 500;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--gray-color);
}

.contact-form {
    flex: 1.5;
    display: flex;
    flex-direction: column;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    font-family: var(--primary-font);
}

.contact-form .btn {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.contact-form .btn:hover {
    background-color: #555;
}

/* ======== FOOTER ======== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* ======== ESTILOS PARA SECCIONES DE SERVICIO DETALLADAS ======== */
.section-container section {
    margin-bottom: 4rem; /* Espacio entre cada sección de servicio principal */
}

.section-container section h2 {
    margin-bottom: 2rem;
    text-align: left;
    font-size: 2rem;
}

.section-container section h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.section-container section p {
    margin-bottom: 1rem;
    color: #555;
}

.section-container section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1.5rem;
    border-radius: 8px; /* Bordes ligeramente redondeados para las imágenes */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Sombra sutil para las imágenes */
}

.section-container section ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.section-container section ul li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* ======== ESTILOS PARA TIPOS DE JARDÍN (2x2) ======== */
.garden-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 2 columnas en pantallas grandes, adaptable */
    gap: 2rem;
    margin-top: 2rem;
}

.garden-type-item {
    border: 1px solid #eee;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.garden-type-item img {
    max-width: 100%; /* Asegura que la imagen no se desborde */
    height: 200px; /* Altura fija para las imágenes */
    object-fit: cover; /* Recorta la imagen para cubrir el espacio */
    margin-bottom: 1rem;
    border-radius: 4px;
}

.garden-type-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.garden-type-item p {
    font-size: 0.95rem;
    color: #666;
}

/* Estilos para la cuadrícula de otros servicios */
.other-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 3 columnas en pantallas grandes, adaptable */
    gap: 2rem;
    margin-top: 4rem; /* Espacio superior para separar del primer servicio */
}

.other-services-grid section {
    border: 1px solid #eee;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.other-services-grid section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.other-services-grid section img {
    max-width: 80%; /* Imágenes más pequeñas */
    height: 200px; /* Altura fija para las imágenes */
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.other-services-grid section p {
    font-size: 0.95rem;
    color: #666;
    text-align: left;
}

.other-services-grid section ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.other-services-grid section ul li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Contenedor principal para centrar el texto */
          /* Contenedor principal de la cita */
        .cita-container {
            /* 2. Hacemos que el contenedor se ajuste al ancho de su contenido */
            
            /* 3. Alineamos el texto DENTRO del contenedor a la izquierda */
    text-align: center;
        }

        /* Estilo para la frase principal (simulando un h2) */
        .cita-texto {
            font-size: 2em;
            font-style: italic;
            font-weight: 600;
            color: #333;
            margin-bottom: 0;
        }

        /* Estilo para la atribución "StipaStudio" */
        .cita-autor {
            font-size: 0.9em;
            color: #666;
            margin-top: 4px;
            font-style: italic;
        }

 /* Estilo para el enlace de Instagram */
        .instagram-link {
            font-size: 1.5em; /* Tamaño más grande para que se vea bien */
            font-weight: bold;
            text-decoration: none;
            display: inline-flex; /* Para alinear el icono y el texto */
            align-items: center; /* Centra verticalmente el icono y el texto */
        }

        /* El icono SVG dentro del enlace */
        .instagram-link svg {
            width: 24px;  /* Ancho del icono */
            height: 24px; /* Alto del icono */
            margin-right: 8px; /* Espacio entre el icono y el texto */
        }

        /* El texto "Instagram" dentro de un span para aplicarle el degradado */
        .instagram-text {
            /* 1. Definimos el fondo como un degradado */
            background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
            
            /* 2. Hacemos que el fondo se recorte con la forma del texto */
            -webkit-background-clip: text;
            background-clip: text;
            
            /* 3. Hacemos que el color del texto sea transparente para revelar el fondo */
            -webkit-text-fill-color: transparent;
            color: transparent; /* Fallback por si el navegador es antiguo */
        }

/* ======== DISEÑO RESPONSIVE (PARA MÓVILES) ======== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem 5%;
    }

    header nav ul {
        margin-top: 1rem;
        gap: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 5%;
    }

    .about-container, .contact-container {
        flex-direction: column;
    }

    .portfolio-grid, .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        min-height: 450px; /* Altura mínima para que todas las tarjetas sean iguales en móvil */
        display: flex; /* Para que el contenido se ajuste mejor dentro de la altura */
        flex-direction: column; /* Apila la imagen y el caption */
    }

    .portfolio-item img {
        flex-grow: 1; /* Permite que la imagen ocupe el espacio restante */
        height: auto; /* Ajusta la altura automáticamente */
    }

    .portfolio-caption {
        flex-shrink: 0; /* Evita que el caption se encoja */
        position: relative; /* Cambia a relative para que fluya con el flexbox */
        background: var(--dark-color); /* Fondo sólido para el caption en móvil */
        padding: 1rem 1.5rem; /* Ajusta el padding */
    }

    /* Estilos para los títulos de servicio que activan el toggle */
    .service-toggle-title {
        cursor: pointer;
        position: relative;
        padding-right: 30px; /* Espacio para el icono */
        text-align: left; /* Alinea el texto a la izquierda */
    }

    .service-toggle-title::after {
        content: '+'; /* Icono de "más" */
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2em;
        transition: transform 0.3s ease;
    }

    .service-toggle-title.active::after {
        content: '-'; /* Icono de "menos" cuando está activo */
    }

    /* Estilos para el contenedor de la descripción */
        .service-description-wrapper {
        visibility: hidden; /* Ocultar por defecto en móvil */
        padding-top: 10px;
        transition: max-height 2s ease-out, opacity 1.5s ease-out, visibility 2s ease-out;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    .service-description-wrapper.show-description {
        visibility: visible; /* Mostrar cuando se activa */
        max-height: 1000px; /* Suficientemente grande para contener el contenido */
        opacity: 1;
    }
}