/* ============================================
   MaderaRP - Responsive Styles
   ============================================ */

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .title-main {
        font-size: 6rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .container {
        max-width: 1140px;
    }
    
    .about-grid {
        gap: 50px;
    }
    
    .footer-grid {
        gap: 40px;
    }
}

/* Laptop (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .nav-menu {
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
    
    .title-main {
        font-size: 4rem;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-item.large {
        grid-column: span 2;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    html {
        font-size: 15px;
    }
    
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-darker);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px 30px;
        gap: 0;
        transition: right var(--transition-normal);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-actions .btn-discord span {
        display: none;
    }
    
    .nav-actions .btn-primary {
        display: none;
    }
    
    /* Hero */
    .title-main {
        font-size: 3.5rem;
    }
    
    .title-line {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 15px);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-visual {
        order: -1;
    }
    
    .visual-card img {
        height: 400px;
    }
    
    .floating-badge {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        display: inline-flex;
        margin: 10px 5px;
    }
    
    .about-visual {
        text-align: center;
    }
    
    /* Jobs */
    .job-slide {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .job-image {
        order: -1;
    }
    
    .job-image img {
        height: 350px;
    }
    
    /* Staff */
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Rules */
    .rules-tabs {
        flex-direction: column;
    }
    
    .rule-tab {
        justify-content: flex-start;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .rule-tab.active {
        border-bottom: none;
        border-left-color: var(--primary);
    }
    
    .rules-content {
        padding: 30px;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    
    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 2;
    }
    
    .gallery-item.tall {
        grid-row: span 1;
    }
    
    /* Join CTA */
    .join-content h2 {
        font-size: 2.5rem;
    }
    
    .join-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .join-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .server-info {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    /* Section styling */
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* Hero */
    .hero {
        min-height: 100svh;
    }
    
    .title-main {
        font-size: 2.8rem;
        letter-spacing: 0.05em;
    }
    
    .title-line {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-badge {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 15px;
    }
    
    .badge-players {
        width: 100%;
        padding-left: 0;
        border-left: none;
        padding-top: 8px;
        margin-top: 8px;
        border-top: 1px solid rgba(16, 185, 129, 0.3);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-scroll {
        display: none;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 30px 25px;
    }
    
    /* About */
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .visual-card img {
        height: 300px;
    }
    
    /* Staff */
    .staff-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-card {
        padding: 25px 20px;
    }
    
    /* Rules */
    .rule-item {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .rule-number {
        font-size: 1.5rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    
    .gallery-item.large,
    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* FAQ */
    .faq-question {
        padding: 20px;
        font-size: 1rem;
    }
    
    .faq-answer p {
        padding: 0 20px 20px;
    }
    
    /* Join CTA */
    .join-cta {
        padding: 100px 0;
    }
    
    .join-content h2 {
        font-size: 2rem;
    }
    
    .join-content p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-top {
        padding: 50px 0 40px;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-desc {
        font-size: 1rem;
    }
}

/* Mobile Small (max-width: 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    /* Hero */
    .title-main {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-item {
        flex: 0 0 100%;
    }
    
    /* Buttons */
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    /* Jobs */
    .job-content h3 {
        font-size: 1.8rem;
    }
    
    .job-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .jobs-nav {
        gap: 12px;
    }
    
    .job-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    /* Section */
    .section {
        padding: 60px 0;
    }
    
    /* Preloader */
    .loader-logo .logo-text {
        font-size: 2rem;
    }
    
    .loader-bar {
        width: 150px;
    }
}

/* Height adjustments for small devices */
@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .hero-stats {
        margin-bottom: 30px;
    }
}

/* Landscape mobile */
@media (max-width: 991px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-badge {
        margin-bottom: 20px;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        margin-bottom: 25px;
    }
    
    .hero-stats {
        margin-bottom: 30px;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* High contrast / Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-video {
        display: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode forced (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, no changes needed */
}

/* Print styles */
@media print {
    .navbar,
    .hero-video,
    .hero-particles,
    .cursor,
    .cursor-follower,
    #preloader,
    .lightbox,
    .btn,
    .hero-scroll {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }
    
    .feature-card:hover,
    .staff-card:hover,
    .faq-item:hover {
        transform: none;
    }
    
    .nav-link:hover {
        background: transparent;
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 48px;
    }
    
    .nav-link {
        min-height: 44px;
    }
    
    .faq-question {
        min-height: 56px;
    }
}
