/* Variables */
:root {
    --mexican-pink: #E4007C;
    --mexican-yellow: #FFD700;
    --mexican-blue: #00B7EB;
    --mexican-orange: #FF6600;
    --mexican-purple: #9D00FF;
    --mexican-green: #009B3A;
    
    --font-primary: 'Open Sans', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --font-handwriting: 'Pacifico', cursive;
    
    --text-dark: #111827;
    --text-gray: #4B5563;
    --text-light: #9CA3AF;
    --white: #ffffff;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.5;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center { text-align: center; }
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }

.font-handwriting {
    font-family: var(--font-handwriting);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-shadow-strong {
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

/* Custom Mexican Styles */
.bg-mexican-stripe {
    background: repeating-linear-gradient(
        90deg,
        var(--mexican-pink),
        var(--mexican-pink) 20px,
        var(--mexican-yellow) 20px,
        var(--mexican-yellow) 40px,
        var(--mexican-blue) 40px,
        var(--mexican-blue) 60px,
        var(--mexican-orange) 60px,
        var(--mexican-orange) 80px,
        var(--mexican-green) 80px,
        var(--mexican-green) 100px
    );
}

.papel-picado-top {
    background-image: radial-gradient(circle at 10px 0, transparent 10px, currentColor 11px);
    background-size: 20px 20px;
    background-repeat: repeat-x;
    height: 20px;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Navbar */
.navbar {
    background-color: var(--mexican-blue);
    border-bottom: 4px solid var(--mexican-yellow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 6rem; /* 24 * 0.25rem = 6rem */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo img {
    height: 3rem;
    /* Removed background and padding */
    transition: transform 0.3s;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-logo span {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--mexican-yellow);
}

/* Specificity fix for Facebook button */
.nav-links .btn-facebook {
    background-color: white;
    color: var(--mexican-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    text-transform: none; /* Reset uppercase if needed */
}

.nav-links .btn-facebook:hover {
    background-color: var(--mexican-yellow);
    color: var(--mexican-blue); /* Ensure text stays blue or change to white? User said "fondo se pone amarillo y se ve que es" */
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: block;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu {
    display: none; /* JS will toggle this */
    background-color: var(--mexican-blue);
    border-top: 1px solid var(--mexican-yellow);
    padding: 1rem;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem;
    color: white;
    font-weight: 700;
    border-radius: 0.375rem;
}

.mobile-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--mexican-yellow);
}

.mobile-menu.open {
    display: block;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
    .mobile-menu-btn { display: none; }
    .mobile-menu { display: none !important; }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6rem;
    padding-bottom: 12rem; /* Increased padding-bottom as requested */
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url('assets/hero.png?v=2.1');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(0, 183, 235, 0.9), rgba(30, 58, 138, 0.7), rgba(0, 155, 58, 0.6));
    mix-blend-mode: multiply;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem;
}

.hero-logo-container {
    display: inline-block;
    margin-bottom: 2rem;
}

.hero-logo {
    height: 16rem;
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

@media (min-width: 768px) {
    .hero-logo { height: 22rem; }
}

.badge {
    background-color: var(--mexican-yellow);
    color: var(--mexican-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid white;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title { font-size: 4.5rem; }
}

.hero-subtitle {
    font-family: var(--font-handwriting);
    display: block;
    margin-bottom: 0.5rem;
    transform: rotate(-1deg);
}

.hero-description {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons { flex-direction: row; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--mexican-blue);
    border: 4px solid var(--mexican-yellow);
    color: white;
}

.btn-primary:hover {
    background-color: var(--mexican-yellow);
    color: var(--mexican-blue);
    border-color: white;
    transform: scale(1.05);
}

.btn-outline {
    background-color: transparent;
    border: 4px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--mexican-blue);
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background-color: white;
    position: relative;
}

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

.section-subtitle {
    color: var(--mexican-orange);
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.title-highlight { color: var(--mexican-blue); }

.title-underline {
    width: 8rem;
    height: 0.5rem;
    margin: 0 auto;
    border-radius: 9999px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-0.5rem);
}

.service-header {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    border-bottom-width: 4px;
    border-bottom-style: solid;
}

.service-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.service-body {
    padding: 2rem;
    background: white;
    border-left: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    height: 100%;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: center;
}

.service-desc {
    color: var(--text-gray);
    text-align: center;
}

/* Products Banner */
.products-banner {
    margin-top: 6rem;
    position: relative;
}

.products-bg {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        var(--mexican-pink),
        var(--mexican-pink) 20px,
        var(--mexican-yellow) 20px,
        var(--mexican-yellow) 40px,
        var(--mexican-blue) 40px,
        var(--mexican-blue) 60px,
        var(--mexican-orange) 60px,
        var(--mexican-orange) 80px,
        var(--mexican-green) 80px,
        var(--mexican-green) 100px
    );
    transform: skewY(-2deg);
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.products-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    border: 4px solid var(--mexican-yellow);
    padding: 2rem;
    overflow: hidden;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    transition: background-color 0.3s;
    border: 2px solid transparent;
}

.product-item:hover {
    background-color: #fefce8;
    border-color: var(--mexican-yellow);
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.about-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .about-card { flex-direction: row; }
}

.about-image {
    width: 100%;
    height: 400px;
    position: relative;
}

@media (min-width: 1024px) {
    .about-image { width: 50%; height: auto; }
}

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

.about-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
}

.about-text {
    padding: 2rem;
    width: 100%;
    position: relative;
}

@media (min-width: 1024px) {
    .about-text { width: 50%; padding: 4rem; }
}

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .about-features { grid-template-columns: repeat(2, 1fr); }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border-width: 1px;
    border-style: solid;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background-color: #111827;
    color: white;
    position: relative;
}

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

@media (min-width: 1024px) {
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-icon {
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.cta-box {
    background: linear-gradient(to right, #2563eb, #1e40af);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    color: var(--text-dark);
    border: 4px solid var(--mexican-blue);
}

@media (min-width: 768px) {
    .form-card { padding: 2.5rem; }
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
    background-color: #f9fafb;
}

.form-input:focus {
    border-color: var(--mexican-blue);
}

.btn-submit {
    width: 100%;
    background-color: var(--mexican-blue);
    color: white;
    font-weight: 700;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1.125rem;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #1d4ed8;
}

/* Footer */
.footer {
    background-color: #111827;
    color: white;
    padding: 4rem 0 2rem;
    border-top: 8px solid var(--mexican-yellow);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 2rem;
    text-center;
    color: var(--text-gray);
}

/* Colors for Utilities */
.text-mexican-blue { color: var(--mexican-blue); }
.text-mexican-yellow { color: var(--mexican-yellow); }
.text-mexican-orange { color: var(--mexican-orange); }
.text-mexican-green { color: var(--mexican-green); }
.text-mexican-purple { color: var(--mexican-purple); }

.bg-mexican-blue { background-color: var(--mexican-blue); }
.bg-mexican-orange { background-color: var(--mexican-orange); }
.bg-mexican-green { background-color: var(--mexican-green); }
.bg-blue-800 { background-color: #1e40af; }

.border-mexican-yellow { border-color: var(--mexican-yellow); }
.border-mexican-blue { border-color: var(--mexican-blue); }
.border-mexican-orange { border-color: var(--mexican-orange); }
.border-white { border-color: white; }

/* Carousel Styles */
.carousel-section {
    padding: 5rem 0;
    background-color: #f3f4f6;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 16/9;
}

@media (min-width: 768px) {
    .carousel-track-container {
        aspect-ratio: 21/9;
    }
}

/* Specific styles for Latest News Carousel to be square */
#latest-gallery .carousel-track-container {
    aspect-ratio: 1/1;
    max-width: 600px; /* Limit width to keep it manageable */
    margin: 0 auto;
}

#latest-gallery .carousel-slide img {
    object-fit: contain; /* Ensure full image is visible */
    background-color: #f3f4f6; /* Background for non-square images */
}

/* Caption Styles */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.carousel-slide:hover .carousel-caption {
    transform: translateY(0);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.carousel-slide:hover img {
    transform: scale(1.05);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    transition: all 0.3s;
    color: var(--mexican-blue);
}

.carousel-btn:hover {
    background-color: var(--mexican-yellow);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    max-width: 100%;
    scrollbar-width: thin;
}

.carousel-dots::-webkit-scrollbar {
    height: 4px;
}

.carousel-dots::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.carousel-dots::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #d1d5db;
    border: none;
    cursor: pointer;
    flex-shrink: 0; /* Prevent dots from squishing */
    transition: background-color 0.3s;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25d366;
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

.whatsapp-float i {
    width: 2rem;
    height: 2rem;
}

.carousel-dot.active {
    background-color: var(--mexican-blue);
    transform: scale(1.2);
}
