/*
Theme Name: AlDente Pro
Theme URI: https://example.com
Description: 一个为MacBook电池健康管理应用AlDente设计的现代WordPress主题
Version: 1.0.0
Author: Your Name
Author URI: https://example.com
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aldente-pro
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.2
*/

/* Font Definitions */
@font-face {
    font-family: 'MiSans-Regular';
    src: url('https://assets-persist.lovart.ai/agent-static-assets/MiSans-Regular.ttf');
}
@font-face {
    font-family: 'MiSans-Bold';
    src: url('https://assets-persist.lovart.ai/agent-static-assets/MiSans-Bold.ttf');
}
@font-face {
    font-family: 'MiSans-Medium';
    src: url('https://assets-persist.lovart.ai/agent-static-assets/MiSans-Medium.ttf');
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'MiSans-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #FFFFFF;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Color Variables */
:root {
    --primary-dark: #0F172A;
    --primary-blue: #3B82F6;
    --primary-blue-hover: #2563EB;
    --text-light: #E2E8F0;
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --bg-light: #F8FAFC;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'MiSans-Bold', sans-serif;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 {
    font-size: 48px;
}

h2 {
    font-size: 36px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

p {
    margin-bottom: 16px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 8px;
    font-family: 'MiSans-Medium', sans-serif;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-dark {
    background-color: transparent;
    border: 1px solid #CBD5E1;
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-outline-dark:hover {
    background-color: #F1F5F9;
    border-color: var(--text-dark);
}

/* Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 120px;
    height: 90px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: all;
    backdrop-filter: blur(2px);
}

.nav-links-wrapper {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links-wrapper .nav-btn {
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle .mobile-bar {
    width: 26px;
    height: 2px;
    background-color: var(--primary-dark);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-bar:nth-of-type(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-bar:nth-of-type(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-bar:nth-of-type(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links-wrapper.is-open {
    display: flex;
}

.logo {
    font-family: 'MiSans-Bold', sans-serif;
    font-size: 24px;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    font-family: 'MiSans-Medium', sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    transition: color 0.2s;
}

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

.nav-btn {
    padding: 10px 24px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    background-color: var(--primary-dark);
    padding: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 800px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    width: 45%;
    z-index: 2;
    color: white;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 24px;
    color: rgba(248, 250, 252, 0.9);
    margin-bottom: 48px;
    font-weight: 300;
}

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

.hero-image-wrapper {
    width: 50%;
    z-index: 2;
    position: relative;
    perspective: 1000px;
}

.hero-image {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    background-color: #1e1e1e;
}

.hero-image:hover {
    transform: rotateY(0) rotateX(0);
}

/* Product Overview Section */
.overview {
    padding: 120px;
    background-color: white;
    text-align: center;
}

.section-header {
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 48px;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

.section-header p {
    font-size: 20px;
    color: var(--text-gray);
    line-height: 1.6;
}

.overview-image-container {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.overview-image {
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
    border: 1px solid #E2E8F0;
    margin: 0 auto;
}

.overview .btn {
    margin-top: 60px;
}

/* Features Section */
.features {
    background-color: var(--primary-dark);
    padding: 120px;
    color: white;
}

.features .section-header h2 {
    color: white;
}

.features .section-header p {
    color: #94A3B8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.feature-card {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
    transform: translateY(-5px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary-blue);
    font-size: 32px;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: white;
}

.feature-card p {
    font-size: 16px;
    color: #94A3B8;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 120px;
    background-color: var(--bg-light);
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    border-radius: 20px;
    font-family: 'MiSans-Medium', sans-serif;
    font-size: 14px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.review-card {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-align: left;
    border: 1px solid #F1F5F9;
}

.stars {
    color: #F59E0B;
    margin-bottom: 20px;
    font-size: 20px;
}

.review-text {
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #64748B;
}

.reviewer-info h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.reviewer-info span {
    font-size: 14px;
    color: var(--text-gray);
}

/* CTA Section */
.cta-section {
    padding: 120px;
    background: linear-gradient(135deg, #10B981 0%, #1E3A8A 100%);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: 56px;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.cta-buttons .btn-primary {
    background-color: white;
    color: #1E3A8A;
}

.cta-buttons .btn-primary:hover {
    background-color: #F1F5F9;
}

/* Newsletter Section */
.newsletter {
    padding: 100px 120px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.newsletter h2 {
    font-size: 36px;
    color: var(--primary-dark);
    margin-bottom: 40px;
}

.newsletter-form {
    display: flex;
    gap: 16px;
    max-width: 600px;
    width: 100%;
}

.newsletter-input {
    flex: 1;
    padding: 16px 24px;
    border-radius: 8px;
    border: 1px solid #CBD5E1;
    font-size: 16px;
    font-family: 'MiSans-Regular', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-input:focus {
    border-color: var(--primary-blue);
}

.terms {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

/* Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: #94A3B8;
    padding: 80px 120px 40px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 60px;
}

.footer-logo {
    font-family: 'MiSans-Bold', sans-serif;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    display: block;
    text-decoration: none;
}

.footer-logo:hover {
    color: var(--primary-blue);
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 24px;
    font-family: 'MiSans-Bold', sans-serif;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94A3B8;
}

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

.copyright {
    display: block;
}

.copyright-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.footer-bottom-widget {
    width: 100%;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-bottom-content p {
    margin-bottom: 0;
}

.footer-bottom-content p:last-child {
    text-align: center;
    flex: 1 1 100%;
}

.footer-bottom-note {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #94A3B8;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-blue);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Utilities */
.text-blue {
    color: var(--primary-blue);
}

.mt-2 {
    margin-top: 8px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 120px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero,
    .overview,
    .features,
    .testimonials,
    .cta-section,
    .newsletter {
        padding: 80px 60px;
    }

    .site-header nav {
        padding: 0 60px;
        gap: 20px;
    }

    .nav-links-wrapper {
        gap: 20px;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        padding-bottom: 40px;
    }

    .hero {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        min-height: auto;
    }

    .hero-content,
    .hero-image-wrapper {
        width: 100%;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .feature-card,
    .review-card {
        max-width: 520px;
        margin: 0 auto;
    }

    .stats {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .hero,
    .overview,
    .features,
    .testimonials,
    .cta-section,
    .newsletter {
        padding: 50px 20px;
    }

    .site-footer {
        padding: 50px 20px 30px;
    }

    .site-header nav {
        padding: 12px 20px;
        height: auto;
        min-height: 78px;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 12px;
        width: 100%;
        position: relative;
        z-index: 1001;
    }

    .logo {
        font-size: 26px;
    }

    .mobile-menu-toggle {
        display: flex;
        justify-self: end;
        margin-left: 0;
        position: static;
        transform: none;
    }

    .site-header .nav-links-wrapper {
        position: fixed;
        top: 78px;
        left: 20px;
        right: 20px;
        width: auto;
        background: linear-gradient(135deg, #111c34, #0F172A);
        border-radius: 22px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        padding: 24px;
        flex-direction: column;
        gap: 18px;
        box-shadow: 0 25px 70px rgba(15, 23, 42, 0.4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
        z-index: 1002;
    }

    .site-header .nav-links-wrapper.is-open {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        text-align: left;
        align-items: flex-start;
        margin: 0;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
        padding: 10px 0;
    }

    .nav-links li + li {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links a {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 18px;
        font-weight: 600;
        color: #F8FAFC;
        letter-spacing: 0.02em;
    }

    .nav-links a::after {
        content: '\203A';
        font-size: 18px;
        color: rgba(248, 250, 252, 0.4);
    }

    .nav-links a:hover {
        color: #93C5FD;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
        border-radius: 16px;
        background: linear-gradient(135deg, #2563EB, #3B82F6);
        box-shadow: 0 18px 35px rgba(59, 130, 246, 0.35);
    }

    html.no-js .site-header .nav-links-wrapper {
        position: static;
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    html.no-js .nav-links {
        gap: 12px;
    }

    .header-top-menu {
        display: none;
    }

    .section-header {
        text-align: left;
    }

    .section-header h2 {
        font-size: 30px;
    }

    .section-header p {
        font-size: 16px;
    }

    .hero {
        text-align: left;
        gap: 30px;
    }

    .hero-content {
        max-width: 460px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 14px;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .feature-card,
    .review-card {
        padding: 28px;
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 16px;
        margin-bottom: 20px;
    }

    .footer-col {
        padding: 0;
        border: none;
    }

    .footer-col h4 {
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 14px;
    }

    .footer-col .footer-links {
        padding-left: 0;
    }

    .footer-col .footer-links li {
        margin-bottom: 8px;
    }

    .overview-image {
        max-width: 100%;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 12px;
        text-align: left;
        width: 100%;
        padding-top: 12px;
        border-top: none;
        align-items: flex-start;
    }

    .footer-bottom-note,
    .footer-bottom-content p:last-child {
        width: 100%;
        text-align: center;
        order: 2;
    }

    .footer-bottom-links,
    .footer-bottom-content .social-links {
        justify-content: flex-start;
        order: 1;
        width: 100%;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .site-header nav {
        grid-template-columns: auto auto;
        justify-content: space-between;
        row-gap: 8px;
    }

    .logo {
        font-size: 24px;
    }

    .site-header .nav-links-wrapper {
        border-top: none;
        padding-top: 0;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-content {
        width: 100%;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .stats,
    .cta-buttons {
        width: 100%;
        align-items: stretch;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .feature-card,
    .review-card {
        margin: 0;
        max-width: none;
    }

    .footer-grid {
        text-align: left;
    }

    .footer-bottom-content {
        align-items: flex-start;
    }

    .footer-bottom-note,
    .footer-bottom-content p:last-child {
        text-align: center;
        width: 100%;
    }
}

/* Post/Page Styles */
.post {
    margin-bottom: 40px;
}

.post-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.post-meta {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

.post-content a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--primary-blue-hover);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Font display optimization */
@font-face {
    font-family: 'MiSans-Regular';
    font-display: swap;
}

@font-face {
    font-family: 'MiSans-Bold';
    font-display: swap;
}

@font-face {
    font-family: 'MiSans-Medium';
    font-display: swap;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
    decoding: async;
}

/* WebP image support */
picture {
    display: block;
}

/* ============================================
   MOBILE OPTIMIZATION - Enhanced
   ============================================ */

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
        line-height: 1.2;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .hero,
    .overview,
    .features,
    .testimonials,
    .cta-section,
    .newsletter {
        padding: 40px 15px;
    }

    .site-header nav {
        padding: 0 10px;
        height: auto;
        flex-wrap: wrap;
    }

    .nav-links {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-input,
    .newsletter-form .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    .hero,
    .overview,
    .features,
    .testimonials,
    .cta-section,
    .newsletter {
        padding: 60px 20px;
    }

    .header-top-menu {
        padding: 8px 20px;
        font-size: 12px;
    }

    .header-menu-links {
        gap: 15px;
    }

    .site-header nav {
        padding: 0 20px;
        height: auto;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .hero-content,
    .hero-image-wrapper {
        width: 100%;
    }

    .hero-image {
        transform: none;
    }

    .features-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    body {
        font-weight: 500;
    }

    button,
    .btn {
        border: 2px solid currentColor;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    button,
    .btn,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    .btn {
        padding: 16px 24px;
    }
}

/* ============================================
   PERFORMANCE: Critical Rendering Path
   ============================================ */

/* Optimize above-the-fold content */
.site-header {
    contain: layout style;
}

.hero {
    contain: layout style;
}

/* Optimize button rendering */
.btn {
    contain: layout style paint;
    will-change: transform;
}

/* Lazy load optimization */
img[loading="lazy"] {
    background: #f0f0f0;
    min-height: 100px;
}

/* Reduce CLS by setting dimensions */
.feature-card,
.review-card {
    contain: layout style;
}

/* ============================================
   TABLET OPTIMIZATION (1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LARGE SCREEN OPTIMIZATION
   ============================================ */

@media (min-width: 1025px) {
    body {
        font-size: 16px;
    }

    .hero,
    .overview,
    .features,
    .testimonials,
    .cta-section,
    .newsletter {
        padding: 120px 120px;
    }

    .site-header nav {
        padding: 0 120px;
    }

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

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

/* ============================================
   SEO & STRUCTURED DATA SUPPORT
   ============================================ */

/* Schema.org structured data */
.product,
.article,
.review {
    schema: product article review;
}

/* Semantic HTML optimization */
article,
section {
    contain: layout style;
}

header,
footer {
    contain: layout style paint;
}
