/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Different fade-in variations for different elements */
.menu-card.fade-in,
.menu-item.fade-in,
.feature.fade-in,
.testimonial.fade-in,
.quick-link-card.fade-in,
.location.fade-in,
.info-item.fade-in,
.delivery-app.fade-in {
    transform: translateY(30px);
}

/* Slightly different animation for hero content */
.hero-content.fade-in {
    transform: translateY(0) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-content.fade-in.visible {
    transform: translateY(0) scale(1);
}

/* Base Styles */
:root {
    --primary-color: #d32f2f; /* Darker red for better contrast */
    --secondary-color: #2b5d82; /* Darker blue for better contrast */
    --dark-color: #1d3557;
    --light-color: #f1faee;
    --danger-color: #d32f2f; /* Updated to match primary */
    --success-color: #2a9d8f;
    --max-width: 1200px;
    
    /* Light Theme (default) */
    --bg-color: #fff;
    --text-color: #333;
    --card-bg: #fff;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --footer-bg: var(--dark-color);
    --footer-text: #fff;
    --section-bg: #f9f9f9;
    --border-color: #ddd;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f1faee;
    --card-bg: #1e1e1e;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --footer-bg: #000;
    --footer-text: #f1faee;
    --section-bg: #1a1a1a;
    --border-color: #333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

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

ul {
    list-style: none;
}

img {
    width: 100%;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    overflow: hidden;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
    font-size: 1.1rem; /* Slightly larger for better readability */
    font-weight: 600; /* Adding some weight helps with contrast */
    border-radius: 5px;
    transition: opacity 0.2s ease-in;
}

.btn:hover {
    opacity: 0.9;
}

.btn-small {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 0.4rem 1rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: opacity 0.2s ease-in;
}

.btn-small:hover {
    opacity: 0.9;
}

/* Header */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 900;
    transition: background-color 0.3s;
    padding: 0.5rem 0;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

/* Theme Toggle Dropdown */
.theme-toggle {
    margin-right: 1rem;
    position: relative;
}

/* Dropdown Button */
.dropbtn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600; /* Adding weight for better contrast */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.dropbtn:hover {
    background-color: #d32f2f;
}

.dropbtn .fa-chevron-down {
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

/* Fixed Position Theme Dropdown */
.theme-dropdown {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 9999; /* Extremely high z-index to ensure it's on top */
}

.theme-dropdown.show {
    display: block;
}

/* Links inside the dropdown */
.theme-dropdown a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

/* Change color of dropdown links on hover */
.theme-dropdown a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Active theme indicator */
[data-theme="dark"] #dark-mode-btn {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

[data-theme="light"] #light-mode-btn {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

/* Active theme indicator */
[data-theme="dark"] #dark-mode-btn {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

[data-theme="light"] #light-mode-btn {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

/* Responsive dropdown for mobile */
@media (max-width: 768px) {
    .dropdown-content {
        right: 0;
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

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

.logo h1 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo h1 a:hover {
    color: var(--dark-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/herobannerpupusas.jpg') no-repeat center center/cover;
    height: 100vh;
    color: #fff;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero .container {
    margin-top: 4rem;
    width: 100%;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(5px);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* About Section */
.about {
    padding: 5rem 0;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.about p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature {
    background: #f4f4f4;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-10px);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Menu Section */
.menu {
    padding: 5rem 0;
    background-color: var(--section-bg);
    transition: background-color 0.3s;
}

.menu h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.menu-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: #666;
}

.menu-preview {
    margin-bottom: 3rem;
}

.menu-category {
    margin-bottom: 3rem;
}

.menu-category h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.menu-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    position: relative;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.menu-item-img {
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

.menu-item:hover .menu-item-img img {
    transform: scale(1.1);
}

.menu-item:hover {
    transform: translateY(-10px);
}

.menu-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.menu-item p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.menu-item .price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.menu-cta {
    text-align: center;
    padding: 2rem 0;
}

.menu-cta p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    text-align: center;
}

.testimonials h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.testimonial-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: #f4f4f4;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    color: #b71c1c; /* Darker red for better contrast against light background */
    font-weight: bold;
    font-size: 1rem; /* Smaller size to maintain the visual hierarchy */
    margin-top: 0.5rem;
}

/* Locations Section */
.locations {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.locations h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.location-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.location {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.location h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.location p {
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--section-bg);
    transition: background-color 0.3s;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-item h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Contact Form Styles */
.contact-form-container {
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
}

.contact-form-container h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: bold;
}

.contact-form-container p {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s, background-color 0.3s;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-color);
    opacity: 0.7;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-transform: uppercase;
    font-weight: bold;
    width: auto;
    align-self: center;
    margin: 0 auto;
    display: block;
}

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

/* Dark mode adjustments for form */
[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background-color: #2a2a2a;
    border-color: #444;
}

.social-media {
    text-align: center;
    margin-top: 3rem;
}

.social-media h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icons a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.social-icons a:hover {
    background: var(--dark-color);
}

/* Footer */
footer {
    background-color: #1d3557;
    color: white;
    padding: 1.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.footer-left {
    flex: 1;
}

.footer-logo h2 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.footer-logo p {
    color: white;
    font-size: 0.85rem;
    margin: 0.2rem 0 1rem 0;
}

.footer-right {
    text-align: right;
    flex: 1;
}

.footer-right h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.footer-links ul li {
    margin-bottom: 0.3rem;
}

.footer-links ul li a {
    color: white;
    transition: color 0.3s;
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.social-section h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

.social-icons a:hover {
    background-color: #d32f2f;
}

.copyright {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 1rem;
}

/* Locations Page Styles */
.page-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://placehold.co/1200x400/e63946/ffffff?text=Ubicaciones') no-repeat center center/cover;
    padding: 150px 0 80px;
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.locations-section {
    padding: 3rem 0;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.location-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.location-info {
    padding: 1.5rem;
}

.location-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.location-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.location-info p i {
    margin-right: 0.8rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.location-info .btn-small {
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .site-logo {
        max-height: 45px;
    }
    
    header .container {
        padding: 0.5rem 1rem;
    }
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: #fff;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 2rem;
    }

    nav ul li {
        margin: 1rem 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

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

    .features,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .menu-items {
        grid-template-columns: 1fr;
    }
}

/* Quick Links Section */
.quick-links {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

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

.quick-link-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.card-icon i {
    font-size: 3rem;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.card-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    flex-grow: 1;
}

.card-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Page Hero for Subpages */
.page-hero {
    background-color: var(--primary-color);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Locations Section Styles */
.locations-section {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

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

.location-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.location-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.location-info {
    padding: 1.5rem;
}

.location-info h3 {
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.location-info p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-info .btn-small {
    margin-top: 1rem;
}

/* Contact Section Styles */
.contact-section {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.contact-layout {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info-column {
    flex: 0.6;
    min-width: 300px;
}

.contact-form-column {
    flex: 0.4;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.contact-list-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.contact-icon {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.4rem;
}

.contact-details {
    flex: 1;
}

.contact-details h3 {
    margin: 0 0 0.5rem 0;
    color: var(--heading-color);
    font-size: 1.3rem;
}

.contact-details p {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.social-media-section {
    margin-top: 2.5rem;
}

.social-media-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

.social-icon i {
    font-size: 1.4rem;
}

.social-icon:hover {
    background-color: #d32f2f;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .contact-layout {
        flex-direction: column;
    }
    
    .contact-info-column,
    .contact-form-column {
        width: 100%;
    }
}
