/* Safe Area and Touch Improvements */
@supports (padding: env(safe-area-inset-bottom)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .mobile-nav {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    .btn {
        min-height: 48px;
    }

    .nav-links a {
        padding: 0.5rem;
    }

    .faq-question {
        min-height: 56px;
    }

    .exp-tab {
        min-height: 44px;
    }

    .social-link {
        min-width: 48px;
        min-height: 48px;
    }

    .contact-method {
        min-height: 48px;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 99;
    padding: 100px 2rem 2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
}

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

/* Responsive - Tablet and below */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .header {
        padding: 0.75rem 1.5rem;
    }

    .header-content {
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

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

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .phone {
        width: 280px;
        height: 570px;
    }

    .weather-temp {
        font-size: 4rem;
    }

    .weather-icon {
        font-size: 4rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .section-title p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .features {
        padding: 4rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.3rem;
    }

    .stats {
        padding: 3rem 1.5rem;
    }

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

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .testimonials {
        padding: 4rem 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .testimonial-card {
        max-width: 100%;
        padding: 1.5rem;
    }

    .download {
        padding: 4rem 1.5rem;
    }

    .download-content {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .download-content h2 {
        font-size: 2rem;
    }

    .download-content p {
        font-size: 1.1rem;
    }

    .update-announcement {
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
    }

    .update-text {
        font-size: 0.9rem;
    }

    .faq {
        padding: 4rem 1.5rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }

    .contact {
        padding: 4rem 1.5rem;
    }

    .contact-content {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .contact-content h2 {
        font-size: 1.75rem;
    }

    .pm-vision {
        padding: 4rem 1.5rem;
    }

    .vision-content {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .vision-content h2 {
        font-size: 1.75rem;
    }

    .experience-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .experience-info {
        text-align: center;
        padding: 1rem;
        order: 2;
    }

    .exp-info-content li {
        text-align: left;
    }

    .experience-tabs {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .exp-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .app-experience {
        padding: 4rem 1.5rem;
    }

    .footer-links {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

    .stat-number {
        font-size: 2rem;
    }

    .experience-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }

    .experience-tabs::-webkit-scrollbar {
        display: none;
    }

    .exp-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .testimonials-grid {
        gap: 1rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .header {
        padding: 0.6rem 1rem;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle span {
        width: 18px;
    }

    .hero {
        padding: 4.5rem 1rem 2rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    .phone {
        width: 240px;
        height: 490px;
    }

    .phone-notch {
        width: 100px;
        height: 25px;
    }

    .weather-app {
        padding: 2.5rem 1rem 1rem;
    }

    .weather-temp {
        font-size: 3.5rem;
    }

    .weather-icon {
        font-size: 3.5rem;
    }

    .weather-condition {
        font-size: 1rem;
    }

    .weather-pills {
        gap: 0.5rem;
    }

    .weather-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }

    .hourly-forecast {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .weather-grid {
        gap: 0.5rem;
    }

    .weather-detail {
        padding: 0.5rem;
        border-radius: 12px;
    }

    .detail-icon {
        font-size: 1rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }

    .section-title {
        margin-bottom: 2.5rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .section-title p {
        font-size: 1rem;
    }

    .features {
        padding: 3rem 1rem;
    }

    .feature-card {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .stats {
        padding: 2.5rem 1rem;
    }

    .stats-grid {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1.25rem 0.75rem;
        border-radius: 20px;
    }

    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .app-experience {
        padding: 3rem 1rem;
    }

    .exp-phone {
        width: 280px;
        height: 570px;
    }

    .testimonials {
        padding: 3rem 1rem;
    }

    .testimonial-card {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .author-info h4 {
        font-size: 0.9rem;
    }

    .author-info p {
        font-size: 0.8rem;
    }

    .download {
        padding: 3rem 1rem;
    }

    .download-content {
        padding: 2rem 1.25rem;
    }

    .download-content h2 {
        font-size: 1.6rem;
    }

    .download-content p {
        font-size: 1rem;
    }

    .update-announcement {
        padding: 1rem;
        margin-bottom: 1.25rem;
        border-radius: 16px;
    }

    .update-header {
        margin-bottom: 0.5rem;
    }

    .update-icon {
        font-size: 1rem;
    }

    .update-title {
        font-size: 0.9rem;
    }

    .update-text {
        font-size: 0.85rem;
    }

    .store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .store-badge img {
        height: 45px;
    }

    .faq {
        padding: 3rem 1rem;
    }

    .faq-item {
        border-radius: 14px;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .faq-answer p {
        font-size: 0.9rem;
        padding: 0 1rem 1rem;
    }

    .contact {
        padding: 3rem 1rem;
    }

    .contact-content {
        padding: 1.75rem 1.25rem;
    }

    .contact-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .contact-content h2 {
        font-size: 1.5rem;
    }

    .contact-content p {
        font-size: 0.95rem;
    }

    .contact-method {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .pm-vision {
        padding: 3rem 1rem;
    }

    .vision-content {
        padding: 2rem 1.25rem;
    }

    .india-flag {
        width: 60px;
        height: 40px;
    }

    .vision-content h2 {
        font-size: 1.4rem;
    }

    .vision-quote {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        gap: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .mobile-nav a {
        font-size: 1.25rem;
    }
}

/* Responsive - Extra Small */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }

    .phone {
        width: 220px;
        height: 450px;
    }

    .exp-phone {
        width: 260px;
        height: 530px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }
}

/* PM Vision Section Responsive */
@media (max-width: 968px) {
    .vision-initiatives {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .initiative-card {
        padding: 1.25rem;
    }

    .vision-quote p {
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .vision-initiatives {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .vision-quote {
        margin-left: 0;
    }

    .vision-quote p {
        font-size: 1rem;
        margin-left: 1.5rem;
    }

    .quote-mark {
        font-size: 2rem;
        left: 10px;
    }

    .quote-author {
        margin-left: 1.5rem;
    }

    .initiative-card {
        padding: 1rem;
    }

    .initiative-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .initiative-card h4 {
        font-size: 1rem;
    }

    .initiative-card p {
        font-size: 0.8rem;
    }

    .vision-tagline {
        font-size: 1.1rem;
    }
}

/* Features Grid Fix for Small Screens */
@media (max-width: 360px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* About Section Responsive */
@media (max-width: 968px) {
    .about {
        padding: 4rem 1.5rem;
    }

    .about-content {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .about-content h2 {
        font-size: 1.75rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .about-values {
        gap: 1.5rem;
    }

    .value-item {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .about-values {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 3rem 1rem;
    }

    .about-content {
        padding: 2rem 1.25rem;
    }

    .about-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        border-radius: 18px;
        margin-bottom: 1.5rem;
    }

    .about-content h2 {
        font-size: 1.5rem;
    }

    .about-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .value-item {
        padding: 1rem;
        border-radius: 16px;
    }

    .value-icon {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .value-item h4 {
        font-size: 1rem;
    }

    .value-item p {
        font-size: 0.85rem;
    }

    .about-tagline {
        font-size: 1rem;
    }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 2rem 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .phone, .exp-phone {
        width: 200px;
        height: 400px;
    }

    .weather-app {
        padding: 2rem 0.75rem 0.75rem;
    }

    .weather-temp {
        font-size: 3rem;
    }

    .weather-icon {
        font-size: 2.5rem;
    }

    .hourly-forecast {
        display: none;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .phone-mockup,
    .exp-phone,
    .feature-card,
    .stat-card,
    .testimonial-card,
    .btn,
    .store-badge {
        transition: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .feature-card,
    .stat-card,
    .testimonial-card,
    .faq-item,
    .contact-content,
    .download-content,
    .about-content,
    .vision-content {
        border-width: 2px;
    }

    .btn-primary {
        border: 2px solid white;
    }

    .btn-secondary {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-nav,
    .weather-bg,
    .phone-mockup,
    .exp-phone,
    .theme-toggle,
    .mobile-menu-toggle,
    .store-buttons,
    .social-links,
    .hero-buttons {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero,
    .features,
    .stats,
    .testimonials,
    .download,
    .faq,
    .contact,
    .pm-vision,
    .about,
    .app-experience {
        padding: 2rem 1rem;
    }

    .feature-card,
    .stat-card,
    .testimonial-card,
    .faq-item,
    .contact-content,
    .download-content,
    .about-content,
    .vision-content {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }
}
