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

:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-color: #fff;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 15px;
    line-height: 1.2;
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
}

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

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

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Header */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.nav a {
    color: var(--text-color);
    margin: 0 15px;
    font-weight: 500;
}

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

.header-actions {
    display: flex;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.hero-image:not(:has(img)) {
    display: none;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    object-fit: cover;
    max-width: 100%;
}

/* Grid & Cards */
.grid {
    display: grid;
    gap: 30px;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Problem Section */
.problem-section {
    padding: 80px 0;
}

.problem-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    min-width: 0;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.feature-image {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.feature-image:not(:has(img)) {
    display: none;
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    background-color: #fff;
    object-fit: cover;
}

/* Tariffs Section */
.tariffs-section {
    padding: 80px 0;
}

.tariffs-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

.tariff-card {
    display: flex;
    flex-direction: column;
}

.tariff-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tariff-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.tariff-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.tariff-features li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.tariff-features li:last-child {
    border-bottom: none;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
}

.accordion-header {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 0 20px 20px;
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: 60px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
}

.footer a {
    color: #aaa;
}

.footer a:hover {
    color: #fff;
}

.footer .logo {
    color: #fff;
    margin-bottom: 15px;
}

/* Mobile Adaptation (Top 5 Devices iOS/Android) */
/* Max-width: 992px */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }

    .feature-row, .feature-row.reverse {
        flex-direction: column;
        text-align: center;
    }
}

/* Max-width: 768px (Tablets / Large Phones) */
@media (max-width: 768px) {
    .nav, .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
    }

    .nav.active a {
        margin: 10px 0;
    }

    .problem-grid, .tariffs-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

/* Specific Phone Resolutions: 430px (iPhone 14/15 Pro Max), 414px (iPhone XR/11), 390px (iPhone 12/13/14), 375px (iPhone 6/7/8/SE/X), 360px (Android popular) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
        padding: 12px 20px;
    }
    
    .card {
        padding: 20px;
    }
}

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.modal-dialog h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-light);
    margin-bottom: 8px;
}

.modal-tariff {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.modal-dialog .form-group {
    margin-bottom: 16px;
}

.modal-dialog label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-light);
}

.modal-dialog input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font: inherit;
}

.modal-dialog .optional {
    font-weight: 400;
    color: #999;
}

.form-error {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.form-success {
    color: #027a48;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 15px;
}

.tariff-card .btn {
    width: 100%;
    border: none;
    font: inherit;
}
