/* Responsive Design */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .newsletter-content {
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-white);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }
    
    .nav-list li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-list li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.125rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Articles */
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Spacing */
    .hero {
        padding: 80px 0 40px;
    }
    
    .features,
    .latest-articles {
        padding: 60px 0;
    }
    
    .newsletter {
        padding: 40px 0;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    /* Responsive Design */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .newsletter-content {
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-white);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }
    
    .nav-list li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-list li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.125rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Articles */
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Spacing */
    .hero {
        padding: 80px 0 40px;
    }
    
    .features,
    .latest-articles {
        padding: 60px 0;
    }
    
    .newsletter {
        padding: 40px 0;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
        /* Grid Adjustments (lanjutan) */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Buttons */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Newsletter Form */
    .form-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-input {
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Mobile Medium */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .nav-brand {
        gap: 8px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .logo {
        width: 35px;
        height: 35px;
    }
    
    /* Hero */
    .hero {
        padding: 70px 0 30px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Sections */
    .features,
    .latest-articles {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    /* Article Cards */
    .article-image {
        height: 180px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.125rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Newsletter */
    .newsletter {
        padding: 30px 0;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .newsletter-description {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-brand h3 {
        font-size: 1.25rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .brand-text {
        font-size: 1.125rem;
    }
    
    .logo {
        width: 30px;
        height: 30px;
    }
    
    /* Hero */
    .hero {
        padding: 60px 0 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Sections */
    .features,
    .latest-articles {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.375rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 1.25rem;
    }
    
    .feature-title {
        font-size: 1.125rem;
    }
    
    /* Article Cards */
    .article-image {
        height: 160px;
    }
    
    .article-category {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .article-content {
        padding: 0.75rem;
    }
    
    .article-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .article-excerpt {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .article-meta {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .read-more {
        font-size: 0.875rem;
    }
    
    /* Newsletter */
    .newsletter-title {
        font-size: 1.25rem;
    }
    
    .newsletter-description {
        font-size: 0.9rem;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer-brand p {
        font-size: 0.875rem;
    }
    
    .footer-links a {
        font-size: 0.875rem;
    }
    
    .contact-info p {
        font-size: 0.875rem;
    }
    
    .footer-bottom p {
        font-size: 0.75rem;
    }
    
    .footer-bottom-links a {
        font-size: 0.75rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    /* Navigation */
    .brand-text {
        font-size: 1rem;
    }
    
    .logo {
        width: 28px;
        height: 28px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.375rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.25rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1rem;
    }
    
    /* Article Cards */
    .article-image {
        height: 140px;
    }
    
    /* Form */
    .form-input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-height: 40px;
    }
}

/* Landscape Orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 50px 0 20px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .features,
    .latest-articles {
        padding: 40px 0;
    }
    
    .newsletter {
        padding: 30px 0;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 12px 24px;
    }
    
    .nav-link {
        padding: 12px 0;
    }
    
    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    .back-to-top {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .article-card:hover,
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .btn-primary:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Accessibility Improvements */
@media (max-width: 767px) {
    /* Larger touch targets */
    .nav-toggle {
        padding: 8px;
        margin: -8px;
    }
    
    /* Better spacing for readability */
    .article-content {
        line-height: 1.7;
    }
    
    .feature-description {
        line-height: 1.6;
    }
    
    /* Improved form accessibility */
    .form-input {
        line-height: 1.5;
    }
}

/* Print Responsive */
@media print and (max-width: 767px) {
    .container {
        padding: 0;
    }
    
    .hero-content,
    .newsletter-content,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .articles-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .article-image {
        height: auto;
        max-height: 200px;
    }
}
