/* ============================================================
   AKSCG - Auto Karting Savez Crne Gore
   Responsive Overrides
   ============================================================ */

/* ----------------------------------------
   Extra Large Screens (< 1400px)
   ---------------------------------------- */
@media (max-width: 1399.98px) {
    .hero-content h1 {
        font-size: 2.7rem;
    }

    #mainNav .nav-link {
        font-size: 0.78rem;
        padding: 0.75rem 0.55rem;
    }
}

/* ----------------------------------------
   Large Screens (< 1200px)
   ---------------------------------------- */
@media (max-width: 1199.98px) {
    h1, .h1 { font-size: 2.1rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.4rem; }

    .hero-slide {
        min-height: 480px;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

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

    #mainNav .nav-link {
        font-size: 0.75rem;
        padding: 0.75rem 0.45rem;
    }

    section, .section {
        padding: 3rem 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ----------------------------------------
   Medium Screens - Tablets (< 992px)
   ---------------------------------------- */
@media (max-width: 991.98px) {
    h1, .h1 { font-size: 1.85rem; }
    h2, .h2 { font-size: 1.55rem; }
    h3, .h3 { font-size: 1.3rem; }
    h4, .h4 { font-size: 1.15rem; }

    /* Navbar - Switch to mobile */
    #mainNav {
        min-height: auto;
        padding: 0.5rem 0;
    }

    .navbar-logo {
        height: 42px;
    }

    /* Hero */
    .hero-slider,
    .hero-slide {
        min-height: 420px;
    }

    .hero-content h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Sections */
    section, .section {
        padding: 2.5rem 0;
    }

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

    /* Page header */
    .page-header {
        padding: 2rem 0 1.75rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    /* Cards - 2 columns on tablet */
    .news-card .card-img-top {
        height: 180px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Contact form */
    .contact-form {
        padding: 1.75rem;
    }

    .contact-info-card {
        padding: 1.75rem;
    }

    /* Members */
    .member-photo {
        width: 110px;
        height: 110px;
    }

    /* Club cards */
    .club-card {
        padding: 1rem;
    }

    .club-logo {
        width: 60px;
        height: 60px;
    }

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

    /* Hide speed lines on smaller screens */
    .speed-lines::before {
        display: none;
    }

    /* Table */
    .results-table .table thead th {
        font-size: 0.8rem;
        padding: 0.65rem 0.75rem;
    }

    .results-table .table tbody td {
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    /* Footer */
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .site-footer .col-lg-4:not(:last-child) {
        text-align: center;
    }

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

    .footer-links a {
        justify-content: center;
    }
}

/* ----------------------------------------
   Small Screens - Large Phones (< 768px)
   ---------------------------------------- */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    h1, .h1 { font-size: 1.6rem; }
    h2, .h2 { font-size: 1.4rem; }
    h3, .h3 { font-size: 1.2rem; }
    h4, .h4 { font-size: 1.05rem; }
    h5, .h5 { font-size: 0.95rem; }

    /* Top bar: hide phone, show only social */
    .top-bar {
        padding: 4px 0;
        font-size: 0.8rem;
    }

    /* Hero */
    .hero-slider,
    .hero-slide {
        min-height: 360px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }

    .hero-content p {
        font-size: 0.92rem;
        margin-bottom: 1.25rem;
        line-height: 1.6;
    }

    .hero-content .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.5rem;
    }

    /* Sections */
    section, .section {
        padding: 2rem 0;
    }

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

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

    /* Page header */
    .page-header {
        padding: 1.5rem 0;
    }

    .page-header h1 {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    .page-header p {
        font-size: 0.92rem;
    }

    .page-header::after {
        display: none;
    }

    /* Breadcrumbs */
    .breadcrumb-wrapper {
        padding: 0.5rem 0;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    /* Cards - single column on mobile */
    .news-card .card-img-top {
        height: 200px;
    }

    .news-card .card-body {
        padding: 1rem;
    }

    .news-card .card-title {
        font-size: 1rem;
    }

    /* Gallery - 2 columns, smaller gaps */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item {
        border-radius: var(--radius-sm);
    }

    /* Album cards */
    .album-card img {
        height: 160px;
    }

    /* Documents */
    .document-item {
        padding: 0.85rem 1rem;
    }

    .document-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* Contact */
    .contact-form {
        padding: 1.25rem;
    }

    .contact-info-card {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    /* Members */
    .member-card {
        padding: 1.5rem 1rem;
    }

    .member-photo {
        width: 100px;
        height: 100px;
    }

    /* Club cards */
    .club-card {
        padding: 1rem;
    }

    .club-logo {
        width: 55px;
        height: 55px;
        margin-right: 1rem;
    }

    /* Tables - horizontal scroll */
    .table-responsive {
        font-size: 0.85rem;
    }

    .results-table .table thead th {
        font-size: 0.75rem;
        padding: 0.5rem;
        white-space: nowrap;
    }

    .results-table .table tbody td {
        font-size: 0.82rem;
        padding: 0.5rem;
        white-space: nowrap;
    }

    .position-badge {
        width: 28px;
        height: 28px;
        font-size: 0.78rem;
    }

    /* Calendar */
    .calendar-wrapper {
        padding: 0.75rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Footer */
    .site-footer .container {
        padding-top: 2rem;
        padding-bottom: 1.5rem;
    }

    .site-footer .col-lg-4,
    .site-footer .col-md-6 {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .footer-links a {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
        text-align: center;
    }

    .footer-bottom .row > div {
        text-align: center !important;
    }

    .footer-bottom .row > div:first-child {
        margin-bottom: 0.25rem;
    }

    /* Stats */
    .stat-number {
        font-size: 1.8rem;
    }

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

    /* Events */
    .event-date-box {
        width: 48px;
        height: 48px;
    }

    .event-date-box .day {
        font-size: 1.1rem;
    }

    .event-date-box .month {
        font-size: 0.65rem;
    }

    /* Back to top */
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }

    /* Pagination */
    .pagination .page-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.85rem;
    }

    /* Sponsors */
    .sponsors-bar {
        padding: 1.5rem 0;
    }

    .sponsor-item img {
        height: 35px;
    }

    /* Flash messages */
    .flash-message {
        font-size: 0.88rem;
        padding: 0.75rem 1rem;
    }

    /* Map */
    .map-wrapper {
        height: 280px;
    }

    /* Hide decorative elements on mobile */
    .tire-track-bg::before {
        display: none;
    }
}

/* ----------------------------------------
   Extra Small Screens - Small Phones (< 576px)
   ---------------------------------------- */
@media (max-width: 575.98px) {
    h1, .h1 { font-size: 1.4rem; }
    h2, .h2 { font-size: 1.25rem; }

    /* Hero */
    .hero-slider,
    .hero-slide {
        min-height: 300px;
    }

    .hero-content h1 {
        font-size: 1.35rem;
    }

    .hero-content p {
        font-size: 0.88rem;
    }

    /* Gallery - can go to 1 col on very small */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Page header */
    .page-header h1 {
        font-size: 1.25rem;
    }

    /* Section title */
    .section-title h2 {
        font-size: 1.2rem;
    }

    /* Cards */
    .news-card .card-img-top {
        height: 170px;
    }

    .news-card .card-meta {
        font-size: 0.78rem;
    }

    /* Documents: stack if needed */
    .document-item {
        flex-wrap: wrap;
    }

    /* Club cards: stack */
    .club-card {
        flex-direction: column;
        text-align: center;
    }

    .club-logo {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    /* Buttons */
    .btn-bordo,
    .btn-outline-bordo {
        padding: 0.5rem 1.2rem;
        font-size: 0.82rem;
    }

    /* Offcanvas */
    .offcanvas {
        max-width: 280px;
    }

    /* Calendar: single day view might be better */
    .fc .fc-button {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Sidebar */
    .sidebar {
        position: static;
        margin-top: 2rem;
    }

    .sidebar-widget {
        padding: 1.25rem;
    }
}

/* ----------------------------------------
   Print Styles
   ---------------------------------------- */
@media print {
    .top-bar,
    #mainNav,
    .checkered-line,
    .back-to-top,
    .sponsors-bar,
    .footer-social,
    .footer-bottom,
    .breadcrumb-wrapper {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .site-footer {
        background: none;
        color: #000;
        padding: 1rem 0;
        border-top: 2px solid #000;
    }

    .page-header {
        background: none;
        color: #000;
        padding: 1rem 0;
        border-bottom: 2px solid #800020;
    }

    .page-header h1 {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    section, .section {
        padding: 1rem 0;
    }
}
