/* --- Global Styles & Variables --- */
:root {
    --primary-color: #00796B; /* Teal */
    --secondary-color: #004D40; /* Darker Teal */
    --accent-color: #FFC107; /* Amber */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --font-family: 'Poppins', sans-serif;
    --container-width: 1100px;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

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

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.main-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-header nav a {
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-header nav a:hover {
    color: var(--secondary-color);
}

/* --- Hamburger Menu --- */
.hamburger-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1050;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


/* --- Buttons --- */
.btn {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.2rem;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 77, 64, 0.3), rgba(0, 77, 64, 0.3)), url('img/pexels-fauxels-3184398.jpg') no-repeat center center;
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 80px 0;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--white); /* Changed from var(--secondary-color) */
    max-width: 800px;
    margin: 0 auto 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--white);
}

/* --- Features Section --- */
.features {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
}

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

.feature-item {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: 50%;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* --- Benefits Section --- */
.benefits {
    padding: 80px 0;
    background: var(--light-gray);
}

.benefit-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefit-text h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.benefit-text p {
    margin-bottom: 1.5rem;
}

.benefit-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.benefit-text ul li {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.benefit-image img {
    max-width: 100%;
    height: auto; /* Ensure aspect ratio is maintained */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* --- Highlighted Benefit --- */
.highlighted-benefit {
    background-color: #e0f2f1; /* Light teal, related to primary */
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.highlighted-benefit p {
    margin: 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.highlighted-benefit p strong {
    color: var(--primary-color);
}

/* --- Footer --- */
.main-footer {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 40px;
}

/* --- Pricing Section --- */
.pricing {
    padding: 80px 0;
    background: var(--white);
}

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

.pricing-plan {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-plan:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.pricing-plan.popular {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.plan-header h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.plan-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
    flex-grow: 1; /* Pushes button to the bottom */
}

.plan-features li {
    margin-bottom: 1rem;
}

.pricing-plan .btn {
    width: 100%;
}

/* Style for text-based prices like 'A medida' */
.plan-price-text {
    font-size: 1.8rem; /* More balanced than 3rem */
    padding-top: 0.7rem; /* Approximate vertical alignment */
    padding-bottom: 0.7rem;
}

/* --- Guarantee Section --- */
.guarantee {
    padding: 60px 0;
    background: var(--light-gray);
    text-align: center;
}

.guarantee img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 50%;
}

.guarantee h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.guarantee p {
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #555;
}

/* --- CTA Section --- */
.cta-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.cta-section .btn-primary:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

/* --- Pricing Switcher --- */
.pricing-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.switcher-label {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 1rem;
}

.ahorro-badge {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8em;
    margin-left: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Pricing Display Logic --- */
.price-annual {
    display: none;
}

.show-annual .price-monthly {
    display: none;
}

.show-annual .price-annual {
    display: inline; /* Or block, depending on desired layout */
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

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

    .benefit-image {
        margin-top: 2rem;
    }

    .pricing-plan.popular {
        transform: scale(1); /* Disable scaling on mobile */
    }

    /* --- Mobile Navigation --- */
    .hamburger-btn {
        display: block;
    }

    #main-nav {
        display: none; /* Hide original nav */
    }

    #main-nav.is-active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1040;
    }

    #main-nav.is-active ul {
        flex-direction: column;
        gap: 2.5rem;
    }

    #main-nav.is-active ul a {
        font-size: 1.8rem;
    }

    .hamburger-btn.is-active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-btn.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

