/* ========================================
   PokeCroc Template - Responsive Styles
   ======================================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        grid-template-areas: "main sidebar";
        gap: 20px;
        width: 100%;
        max-width: 100%;
    }

    .sidebar-left {
        order: 1;
    }

    .main-content {
        order: 2;
    }

    .sidebar-right {
        order: 3;
    }

    .main-content {
        grid-row: auto;
    }

    .nav-menu {
        gap: 5px;
    }

    .nav-item a {
        padding: 10px 18px;
        font-size: 14px;
    }

    .logo {
        height: 100px;
    }

    .logo-glow {
        width: 160px;
        height: 160px;
    }

    .slide-content {
        padding: 40px;
    }

    .slide-title {
        font-size: 36px;
    }

    .slide-description {
        font-size: 16px;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* Ajustar bordas para mobile */
    .themebox {
        border-width: 30px;
        border-image: url('../images/box1.png') 30 round;
    }

    .news-card {
        border-width: 25px;
        border-image: url('../images/box1.png') 25 round;
    }

    .news-section,
    .page-content {
        border-width: 30px;
        border-image: url('../images/box1.png') 30 round;
        padding: 25px;
    }

    /* Header */
    .header-content {
        flex-wrap: nowrap;
        justify-content: center;
        position: relative;
    }

    .nav-left,
    .nav-right {
        display: none;
    }

    .logo-container {
        order: 1;
    }

    .logo {
        height: 80px;
    }

    .logo-glow {
        width: 140px;
        height: 140px;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-nav {
        display: block;
    }

    /* Content */
    .content-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "sidebar";
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar-left,
    .sidebar-right {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hero Slider */
    .heroSwiper {
        height: auto;
        min-height: 400px;
    }

    .slide-content {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .slide-title {
        font-size: 28px;
    }

    .slide-description {
        font-size: 14px;
    }

    .slide-image {
        order: -1;
    }

    .slide-image img {
        max-height: 250px;
    }

    /* News */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 28px;
    }

    .news-tabs {
        width: 100%;
        justify-content: flex-start;
    }

    .news-tab {
        padding: 8px 15px;
        font-size: 12px;
    }

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

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-social {
        justify-content: center;
    }

    /* Decorative Elements */
    .croc-decoration {
        display: none;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .logo {
        height: 50px;
    }

    /* Bordas ainda menores para telas pequenas */
    .themebox {
        border-width: 20px;
        border-image: url('../images/box1.png') 20 round;
    }

    .news-card {
        border-width: 20px;
        border-image: url('../images/box1.png') 20 round;
    }

    .news-section,
    .page-content {
        border-width: 20px;
        border-image: url('../images/box1.png') 20 round;
        padding: 15px;
    }

    .main-container {
        padding: 20px 0;
    }

    .themebox-content {
        padding: 15px;
    }

    .slide-title {
        font-size: 24px;
    }

    .slide-description {
        font-size: 13px;
    }

    .btn-play {
        font-size: 16px;
        padding: 12px 30px;
    }

    .section-title {
        font-size: 24px;
    }

    .news-section,
    .page-content {
        padding: 20px 15px;
    }

    .news-image {
        height: 180px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-meta {
        font-size: 11px;
        gap: 10px;
    }

    .news-excerpt {
        font-size: 13px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .player-item {
        padding: 8px;
    }

    .player-rank {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .player-name {
        font-size: 13px;
    }

    .player-level {
        font-size: 11px;
    }

    .main-footer {
        padding: 30px 0 15px;
    }

    .footer-section h4 {
        font-size: 16px;
    }

    .footer-section p,
    .footer-section ul li a {
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .heroSwiper {
        height: 350px;
    }

    .slide-content {
        flex-direction: row;
        padding: 20px;
    }

    .slide-title {
        font-size: 24px;
    }

    .slide-description {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .slide-image img {
        max-height: 200px;
    }
}

/* Large Desktop (1400px and above) */
@media (min-width: 1400px) {
    .container {
        max-width: 1600px;
    }

    .content-wrapper {
        grid-template-columns: minmax(300px, 320px) minmax(0, 1fr);
        gap: 30px;
        max-width: 100%;
    }

    .heroSwiper {
        height: 550px;
    }

    .slide-title {
        font-size: 52px;
    }

    .slide-description {
        font-size: 22px;
    }

    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
    }
}

/* Print Styles */
@media print {
    .main-header,
    .sidebar,
    .hero-slider,
    .main-footer,
    .croc-decoration,
    .btn {
        display: none !important;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .main-content {
        width: 100%;
    }

    body {
        background: white;
        color: black;
    }

    .background-wrapper {
        display: none;
    }
}

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

    .slide-image img,
    .croc-decoration {
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00ff00;
        --secondary-color: #004400;
        --text-light: #ffffff;
        --border-color: #00ff00;
    }

    .themebox,
    .news-card {
        border-width: 3px;
    }

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

/* Dark Mode Support (if system prefers dark) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can adjust if needed */
    .background-image {
        filter: brightness(0.3);
    }
}
