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

html {
    scroll-behavior: smooth;
}

#home .hero-carousel {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    overflow: hidden;
    height: 70vh;
    min-height: 320px;
    max-height: 720px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

#home .hero-carousel .slides {
    width: 100%;
    height: 100%;
    position: relative;
}

#home .hero-carousel .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#home .hero-carousel .slide.active {
    opacity: 1;
}

#home .hero-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85; /* Slight transparency to reveal body background */
}

#home .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.3s ease, transform 0.2s ease;
}

#home .carousel-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    transform: translateY(-50%) scale(1.05);
}

#home .carousel-btn.prev { left: 16px; }
#home .carousel-btn.next { right: 16px; }

#home .carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
}

#home .carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
}

#home .carousel-dots button.active {
    background: #fff;
}

@media (max-width: 768px) {
    #home .hero-carousel { height: 50vh; min-height: 220px; }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: black;
    /* Background image for entire page with a subtle dark overlay */
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/g1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* (removed gradient animation since we use a background image) */

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(78, 205, 196, 0.95));
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: black;
    margin-bottom: -5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo p {
    font-size: 0.9rem;
    color: black;
    font-style: italic;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

/* Mobile nav toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: black;
    font-size: 1.6rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.nav-link {
    text-decoration: none;
    color: black;
    font-weight: 700; /* bolder text */
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent; /* will be colored per section */
}

/* Smooth transform for nav icons */
.nav-link i {
    transition: transform 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: black;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: 100px;
    min-height: calc(100vh - 100px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #000 !important;
    backdrop-filter: blur(15px);
    box-shadow: 8px 0 32px rgba(255, 107, 107, 0.2);
    padding: 2rem 0;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 100px; /* height of navbar */
    left: 0;
    height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Sidebar becomes fixed after threshold via JS - no longer needed (sidebar is fixed by default) */
/* Removed empty .sidebar.is-fixed ruleset to satisfy linter */

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: black;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent; /* will be colored per section */
}

.sidebar-item:hover,
.sidebar-item.active {
    background: linear-gradient(45deg, #45b7d1, #96ceb4);
    color: black;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(69, 183, 209, 0.4);
}

.sidebar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sidebar-item:hover::before {
    left: 100%;
}

.sidebar-item i {
    font-size: 1.2rem;
    width: 20px;
    transition: color 0.18s ease;
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem;
    /* Allow page-level scrolling instead of inner container scrolling */
    overflow: visible;
    margin-left: 250px; /* reserve space for fixed sidebar on desktop */
}

/* When sidebar is fixed, shift content to the right */
.content.with-fixed-sidebar {
    margin-left: 250px; /* retained for compatibility */
}

.section {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3rem;
    color: black;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.section-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

/* Simple layout for new gallery sections */
.image-block {
    margin-bottom: 1.5rem;
}

.image-block img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    opacity: 0.85; /* Slight transparency to reveal body background */
}

/* Modal image slight transparency as well */
#modalImage {
    opacity: 0.85;
}

.text-block h3 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: black;
}

.text-block p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: black;
}

/* Home features text color (blue as requested) */
#home .features .feature span {
    color: blue;
}

/* Sidebar: dark background and readable text (merged into main .sidebar block above) */

.sidebar-item {
    color: #fff;
}

.sidebar-item i {
    color: #fff; /* default icon color, overridden per section below */
    transition: color 0.2s ease, transform 0.18s ease;
}
.sidebar-item span {
    transition: transform 0.18s ease;
}

/* Scroll direction subtle shift (apply to top nav only; sidebar remains static) */
html.icons-scrolling-down .nav-link i {
    transform: translateY(6px);
}

html.icons-scrolling-up .nav-link i {
    transform: translateY(0);
}

/* Sidebar icon highlight colors per link */
.sidebar-item[data-section="home"] i { color: #ff6b6b; }
.sidebar-item[data-section="about"] i { color: #4ecdc4; }
.sidebar-item[data-section="services"] i { color: #45b7d1; }
.sidebar-item[data-section="profile"] i { color: #f093fb; }
.sidebar-item[data-section="contact"] i { color: #f1c40f; }

/* Top nav icon/border colors per section */
.nav-link[data-section="home"] { border-color: #ff6b6b; }
.nav-link[data-section="home"] i { color: #ff6b6b; }
.nav-link[data-section="about"] { border-color: #4ecdc4; }
.nav-link[data-section="about"] i { color: #4ecdc4; }
.nav-link[data-section="services"] { border-color: #45b7d1; }
.nav-link[data-section="services"] i { color: #45b7d1; }
.nav-link[data-section="profile"] { border-color: #f093fb; }
.nav-link[data-section="profile"] i { color: #f093fb; }
.nav-link[data-section="contact"] { border-color: #f1c40f; }
.nav-link[data-section="contact"] i { color: #f1c40f; }

/* Sidebar border colors per section */
.sidebar-item[data-section="home"] { border-color: #ff6b6b; }
.sidebar-item[data-section="about"] { border-color: #4ecdc4; }
.sidebar-item[data-section="services"] { border-color: #45b7d1; }
.sidebar-item[data-section="profile"] { border-color: #f093fb; }
.sidebar-item[data-section="contact"] { border-color: #f1c40f; }

/* Hover/active colorized backgrounds per section (top nav) */
.nav-link[data-section="home"]:hover,
.nav-link[data-section="home"].active { background: rgba(255,107,107,0.18); }
.nav-link[data-section="about"]:hover,
.nav-link[data-section="about"].active { background: rgba(78,205,196,0.18); }
.nav-link[data-section="services"]:hover,
.nav-link[data-section="services"].active { background: rgba(69,183,209,0.18); }
.nav-link[data-section="profile"]:hover,
.nav-link[data-section="profile"].active { background: rgba(240,147,251,0.18); }
.nav-link[data-section="contact"]:hover,
.nav-link[data-section="contact"].active { background: rgba(241,196,15,0.22); }

/* Hover/active colorized backgrounds per section (sidebar) */
.sidebar-item[data-section="home"]:hover,
.sidebar-item[data-section="home"].active { background: rgba(255,107,107,0.18); }
.sidebar-item[data-section="about"]:hover,
.sidebar-item[data-section="about"].active { background: rgba(78,205,196,0.18); }
.sidebar-item[data-section="services"]:hover,
.sidebar-item[data-section="services"].active { background: rgba(69,183,209,0.18); }
.sidebar-item[data-section="profile"]:hover,
.sidebar-item[data-section="profile"].active { background: rgba(240,147,251,0.18); }
.sidebar-item[data-section="contact"]:hover,
.sidebar-item[data-section="contact"].active { background: rgba(241,196,15,0.22); }

/* Subtle glow on hover/click */
.nav-link:hover, .nav-link.active,
.sidebar-item:hover, .sidebar-item.active {
    box-shadow: 0 8px 24px rgba(0,0,0,0.16), 0 0 0 3px rgba(0,0,0,0.02) inset;
}

/* Click pulse state */
.nav-link.clicked, .sidebar-item.clicked {
    transform: scale(1.03);
    filter: brightness(1.06);
}

/* Slight pulse animation for feedback */
@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.nav-link.clicked, .sidebar-item.clicked { animation: clickPulse 220ms ease; }

/* Make key headlines bolder */
.section-header h2,
.text-block h3,
.service-card h3,
.profile-content h3,
.contact-info h3,
.contact-form h3 { font-weight: 800; }

/* Make body copy slightly bolder for readability */
p, .form-group label, .info-item, .contact-item span, .contact-item a { font-weight: 600; }

/* Contact section: color-coded icons and borders */
.contact-item { border-left: 4px solid transparent; padding-left: 0.75rem; transition: background 0.2s ease, border-color 0.2s ease; }
.contact-item .fa-map-marker-alt { color: #e74c3c; }
.contact-item .fa-phone { color: #2ecc71; }
.contact-item .fa-envelope { color: #3498db; }
.contact-item .fa-clock { color: #f1c40f; }

/* Border colors match icon accents */
.contact-item:has(.fa-map-marker-alt) { border-color: #e74c3c; }
.contact-item:has(.fa-phone) { border-color: #2ecc71; }
.contact-item:has(.fa-envelope) { border-color: #3498db; }
.contact-item:has(.fa-clock) { border-color: #f1c40f; }

/* Hover/active feedback for contact items */
.contact-item:hover { background: rgba(255,255,255,0.08); }
.contact-item:active { background: rgba(255,255,255,0.14); }

/* Hover/active states for sidebar links */
.sidebar-item:hover,
.sidebar-item.active {
    color: #ffeb3b;
}

.sidebar-item:hover i,
.sidebar-item.active i {
    filter: brightness(1.15);
}

#home .hero-text { background-color: #fff59d; } /* amarillo suave */

/* Override: yellow background for Home intro block */
#home .hero-text {
    background-color: #ffeb3b; /* amarillo (coincide con tu tema) */
    border-color: rgba(255, 235, 59, 0.45);
  }
  

  /* Override: make Profile section texts black */
#profile .profile-info,
#profile .profile-info h3,
#profile .profile-info .info-item,
#profile .profile-info .info-item strong,
#profile .certifications,
#profile .certifications h3,
#profile .certifications li,
#profile .team,
#profile .team h3,
#profile .team p {
  color: #111 !important;
  text-shadow: none;
}



  /* Asegura legibilidad del texto en amarillo */
  #home .hero-text h3,
  #home .hero-text p {
    color: #111;
  }

/* Yellow highlight for requested sections/texts */
#galeria-2 .text-block h3,
#galeria-2 .text-block p {
    color: #ffeb3b; /* yellow */
}

#galeria-3 .text-block h3,
#galeria-3 .text-block p {
    color: #ffeb3b; /* yellow */
}

#galeria-3 .section-header h2 {
    color: #ffeb3b; /* Atención y Servicio */
}

#galeria-4 .section-header h2 {
    color: #ffeb3b; /* yellow */
}

/* Also make 'Siempre surtidos' and its paragraph yellow in galeria-4 */
#galeria-4 .text-block h3,
#galeria-4 .text-block p {
    color: #ffeb3b; /* yellow */
}

/* Make 'Compromiso con la Comunidad' heading yellow in galeria-5 */
#galeria-5 .section-header h2 {
    color: #ffeb3b; /* yellow */
}

/* Make 'Contigo todos los días' and its paragraph yellow in galeria-5 */
#galeria-5 .text-block h3,
#galeria-5 .text-block p {
    color: #ffeb3b; /* yellow */
}

/* Contact section highlights */
#contact .section-header h2 {
    color: #ffeb3b; /* Contacto title */
}

#contact .map-section h3 {
    color: black; /* Revert: keep 'Nuestra Ubicación' in default/dark color */
}

#contact .submit-btn {
    background: #ffeb3b;
    color: #111;
    border: 2px solid rgba(0,0,0,0.1);
}

#contact .submit-btn:hover {
    background: #ffc107; /* slightly deeper yellow on hover */
    color: #111;
}

/* About section title highlight */
#about .section-header h2 {
    color: #ffeb3b; /* Acerca de Nosotros */
}

/* Home section title highlight */
#home .section-header h2 {
    color: #ffeb3b; /* Bienvenidos a Granero El Ejido */
}

/* Home hero text (subtitle and paragraph) */
#home .hero-text h3,
#home .hero-text p {
    color: #ffeb3b;
}

/* Full-bleed layout for gallery sections so images span 100% of the body */
#galeria-2 .section-content,
#galeria-3 .section-content,
#galeria-4 .section-content,
#galeria-5 .section-content {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
}

#galeria-2 .image-block,
#galeria-3 .image-block,
#galeria-4 .image-block,
#galeria-5 .image-block {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

#galeria-2 .text-block,
#galeria-3 .text-block,
#galeria-4 .text-block,
#galeria-5 .text-block {
    max-width: 1200px;
    margin: 1rem auto 3rem auto;
    padding: 0 1rem;
}

.section-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1), rgba(69, 183, 209, 0.1));
    border-radius: 25px;
    z-index: -1;
}

/* Home Section Specific Styles */
#home {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%234a7c59" width="1200" height="600"/><circle fill="%236b9b76" cx="200" cy="150" r="80"/><circle fill="%236b9b76" cx="800" cy="400" r="60"/><rect fill="%235a8c63" x="100" y="300" width="200" height="100" rx="20"/><rect fill="%235a8c63" x="900" y="100" width="150" height="80" rx="15"/></svg>');
    background-size: cover;
    background-position: center;
}

/* Full-bleed hero media (edge-to-edge) */
#home .hero-media {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

#home .hero-media img {
    display: block;
    width: 100%;
    height: auto;
}

#home .hero-text {
    /* Removed background rooster image */
    background-image: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    padding: 2rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.2);
    position: relative;
    overflow: hidden;
}

#home .hero-text::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

#home .hero-text h3 {
    font-size: 2.5rem;
    color: black;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

#home .hero-text p {
    font-size: 1.2rem;
    color: black;
    margin-bottom: 2rem;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    border-radius: 15px;
    border-left: 4px solid #ff6b6b;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.2);
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.feature:hover::before {
    left: 100%;
}

.feature i {
    color: black; /* check mark icon in black */
    font-size: 1.8rem;
    transition: transform 0.2s ease, text-shadow 0.2s ease, filter 0.2s ease;
}

.feature:hover i {
    /* maintain a subtle emphasis without colored glow for black icon */
    filter: brightness(1.15);
    transform: scale(1.05);
}

/* About Section Specific Styles */
#about {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('assets/gallo1.jpeg');
    background-size: cover;
    background-position: center;
}

#about .about-content {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%), url('assets/gallo1.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

#about .about-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 107, 107, 0.05), transparent);
    animation: shimmer 4s ease-in-out infinite;
    z-index: 1;
}

#about .about-content h3 {
    color: black;
    font-size: 2rem;
    margin: 2rem 0 1rem 0;
    position: relative;
    z-index: 2;
    font-weight: 600;
}

#about .about-content p {
    color: black;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

#about .about-content ul {
    list-style: none;
    padding-left: 0;
}

#about .about-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: black;
}

/* Services Section Specific Styles */
#services {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23667eea" width="1200" height="600"/><circle fill="%237b8ef0" cx="250" cy="180" r="90"/><circle fill="%237b8ef0" cx="950" cy="420" r="65"/><rect fill="%235a72e6" x="200" y="350" width="160" height="120" rx="20"/></svg>');
    background-size: cover;
    background-position: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.05), rgba(78, 205, 196, 0.05), rgba(69, 183, 209, 0.05));
    border-radius: 20px;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.3);
}

.service-card:hover::before {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1), rgba(69, 183, 209, 0.1));
}

.service-card i {
    font-size: 3.5rem;
    color: black;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: black;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
}

/* Profile Section Specific Styles */
#profile {
    /* Modern light gradient background for the profile section */
    background: linear-gradient(135deg, #fdfbfb 0%, #6cb8df 100%);
    min-height: 85vh;
}

.profile-content h3 {
    color: black;
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
}

/* Layout for profile content: image + info */
.profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

/* Make inner container transparent so the profile background is visible */
#profile .section-content {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

/* Add a readable card behind the text */
#profile .profile-info {
    background: rgba(82, 81, 151, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.6);
}

/* Yellow text inside the profile info card for higher emphasis */
#profile .profile-info,
#profile .profile-info h3,
#profile .profile-info .info-item,
#profile .profile-info .info-item strong {
    color: #ffeb3b;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Make Certifications and Team match the same card style and yellow text */
#profile .certifications,
#profile .team {
    background: rgba(82,81,151,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.6);
    margin-top: 1rem;
}

#profile .certifications,
#profile .certifications h3,
#profile .certifications li,
#profile .team,
#profile .team h3,
#profile .team p {
    color: #ffeb3b;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* Desktop: subtle parallax for profile background */
@media (min-width: 769px) {
    #profile {
        background-attachment: initial;
    }
}

.profile-photo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.profile-photo img {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem 0;
}

.info-item {
    padding: 1rem;
    background: rgba(76, 124, 89, 0.1);
    border-radius: 10px;
    border-left: 4px solid #4a7c59;
}

.certifications ul,
.team {
    margin-top: 1rem;
}

.certifications li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Contact Section Specific Styles */
#contact {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23ffecd2" width="1200" height="600"/><circle fill="%23fcf4dd" cx="200" cy="200" r="95"/><circle fill="%23fcf4dd" cx="1000" cy="400" r="80"/><rect fill="%23f9e6c7" x="120" y="380" width="190" height="100" rx="22"/></svg>');
    background-size: cover;
    background-position: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3,
.contact-form h3 {
    color: black;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.contact-item i {
    color: black;
    font-size: 1.2rem;
    width: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: black;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7c59;
}

.submit-btn {
    background: linear-gradient(45deg, #2c5530, #4a7c59);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Map Section */
.map-section {
    margin-top: 2rem;
}

.map-section h3 {
    color: black;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.map-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.2);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.map-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: black;
    text-decoration: none;
    font-weight: 600;
}

.map-link:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 768px) {
    /* Avoid jank with fixed backgrounds on mobile */
    body {
        background-attachment: scroll;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        margin-right: 0.75rem;
    }

    .nav-menu {
        display: none; /* collapsed by default on mobile */
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.25rem;
    }

    /* open state toggled by JS */
    .nav-menu.open {
        display: flex;
    }

    .main-container {
        flex-direction: column;
        margin-top: 150px;
    }

    .sidebar {
        width: 100%;
        order: 2;
        position: fixed; /* sticky bottom nav on mobile */
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        height: 90px;
        padding: 0.5rem 0.25rem;
        border-top: 2px solid rgba(255, 255, 255, 0.1);
        border-right: none;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(78, 205, 196, 0.9));
        backdrop-filter: blur(12px);
        z-index: 1001;
    }

    .sidebar-menu {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        overflow-x: auto;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .sidebar-item {
        min-width: auto;
        flex: 1 1 auto;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        padding: 0.5rem 0.25rem;
        border-radius: 12px;
        transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    }

    .sidebar-item i { font-size: 1.4rem; }
    .sidebar-item span { font-size: 0.8rem; }

    .sidebar-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 18px rgba(0,0,0,0.18);
        background: rgba(255,255,255,0.08);
    }

    /* Animated active indicator bar */
    .sidebar-item.active {
        background: rgba(255,255,255,0.12);
    }
    .sidebar-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: #ffeb3b;
        box-shadow: 0 0 10px rgba(255, 235, 59, 0.8);
        animation: glow 1.6s ease-in-out infinite alternate;
    }

    @keyframes glow {
        from { box-shadow: 0 0 8px rgba(255, 235, 59, 0.6); }
        to   { box-shadow: 0 0 16px rgba(255, 235, 59, 1); }
    }

    .content {
        order: 1;
        padding: 1rem;
        margin-left: 0; /* no fixed sidebar space on mobile */
        padding-bottom: 90px; /* space for sticky bottom sidebar */
    }

    /* Additional responsive tweaks */
    .section-header h2 { font-size: 2rem; }
    .section-content { padding: 1.5rem; }
    .contact-container { grid-template-columns: 1fr; gap: 2rem; }
    .services-grid { grid-template-columns: 1fr; }
    .logo h1 { font-size: 1.8rem; }

    /* Mobile: shorter profile hero to avoid extra scroll */
    #profile {
        min-height: 70vh;
        background-position: center;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 2% auto;
    padding: 10px;
    width: 98%;
    max-width: none;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
    height: 96vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-caption {
    color: white;
    font-size: 1.2rem;
    margin-top: 15px;
    font-weight: bold;
}

/* Add background image and click cursor to Pollos card */
.service-card:nth-child(2) {
    cursor: pointer;
    background-image: url('assets/img3.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.service-card:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.service-card:nth-child(2) * {
    position: relative;
    z-index: 2;
}

.service-card:nth-child(2):hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

.service-card:nth-child(2):hover::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Add background image to Granos y Semillas card (first card) */
.service-card:nth-child(1) {
    cursor: pointer;
    background-image: url('assets/img8.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.service-card:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.service-card:nth-child(1) * {
    position: relative;
    z-index: 2;
}

.service-card:nth-child(1):hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(78, 205, 196, 0.4);
}

.service-card:nth-child(1):hover::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Add background image to Conejos card (third card) */
.service-card:nth-child(3) {
    cursor: pointer;
    background-image: url('assets/img9.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.service-card:nth-child(3)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.service-card:nth-child(3) * {
    position: relative;
    z-index: 2;
}

.service-card:nth-child(3):hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(150, 206, 180, 0.4);
}

.service-card:nth-child(3):hover::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Add background image to Pescaditos card (fourth card) */
.service-card:nth-child(4) {
    cursor: pointer;
    background-image: url('assets/img10.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.service-card:nth-child(4)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.service-card:nth-child(4) * {
    position: relative;
    z-index: 2;
}

.service-card:nth-child(4):hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.4);
}

.service-card:nth-child(4):hover::before {
    background: rgba(255, 255, 255, 0.2);
}
