/**
 * NordCup League - Modern Dark Theme
 * Based on professional soccer website design
 */

/* ===================
   RESET & BASE STYLES
   =================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* ===================
   BACKGROUND & OVERLAY
   =================== */

.background-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 50%, rgba(0,0,0,0.15) 100%),
                url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

/* ===================
   LOGO HEADER
   =================== */

.logo-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
    transition: all 0.3s ease;
}

.logo-header.scrolled {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
    pointer-events: none;
}

.main-logo {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8)) drop-shadow(0 0 40px rgba(0,0,0,0.4));
    transition: all 0.3s ease;
    background: rgba(19, 33, 44, 0.9);
    border-radius: 20%;
    padding: 25px;
    border: 3px solid rgba(184, 179, 89, 0.8);
    display: block;
    box-sizing: content-box;
}

/* ===================
   NAVIGATION
   =================== */

.top-nav {
    background: transparent;
    backdrop-filter: none;
    padding: 15px 0;
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
    z-index: 500;
    box-shadow: none;
    transition: all 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 0 15px;
}

.top-nav.scrolled .hamburger {
    transform: scale(0.8);
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

/* Hamburger Button */
.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
    background: none;
    border: none;
    transition: transform 0.3s ease;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hide desktop navigation - using hamburger for all screens */
.nav-menu {
    display: none;
}

/* Sidebar Menu */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(19, 33, 44, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    transition: right 0.3s ease;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

.mobile-sidebar.active {
    right: 0;
}

@media (min-width: 1024px) {
    .mobile-sidebar {
        width: 400px;
        right: -400px;
        background: rgba(19, 33, 44, 0.98);
    }
}

.sidebar-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
}

.sidebar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    color: #B8B359;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    height: calc(100vh - 120px);
}

.mobile-nav-item {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #B8B359;
    padding-left: 10px;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.admin-link-sidebar {
    opacity: 0.6;
    font-size: 14px !important;
    margin-top: auto;
    border-top: 2px solid rgba(184, 179, 89, 0.3) !important;
    border-bottom: none !important;
}

.admin-link-sidebar:hover {
    opacity: 1;
    color: #B8B359 !important;
}

@media (min-width: 1024px) {
    .mobile-nav-item {
        font-size: 18px;
        padding: 25px 0;
    }
}

/* Overlay for mobile menu */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================
   HEADER SECTION
   =================== */

.header {
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.header h1 {
    font-size: 3.5em;
    font-weight: 900;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.header p {
    font-size: 1.2em;
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    font-weight: 300;
}

/* ===================
   MAIN CONTENT
   =================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 100;
}

.section {
    margin-bottom: 60px;
}

.section:first-child {
    margin-top: 40px;
}

/* ===================
   LEAGUE TABLE STYLES
   =================== */

.table-container {
    background: #13212C;
    background: rgba(19, 33, 44, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.1);
    overflow: hidden;
}

.table-header {
    background: rgba(19, 33, 44, 0.98);
    padding: 20px 25px;
    border-bottom: 3px solid #B8B359;
}

.table-title {
    color: #fff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.season-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    font-weight: 400;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(19, 33, 44, 0.95);
}

.table thead {
    background: rgba(19, 33, 44, 0.98);
}

.table th {
    padding: 15px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.table th:first-child {
    text-align: left;
    width: 50px;
}

.table th:nth-child(2) {
    text-align: left;
    min-width: 180px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.2s ease;
}

.table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.table tbody tr:hover {
    background: rgba(184, 179, 89, 0.2);
}

.table td {
    padding: 18px 12px;
    text-align: center;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #B8B359;
    font-size: 16px;
}

.table td:nth-child(2) {
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.table .points {
    font-weight: 700;
    color: #B8B359;
    font-size: 16px;
}

/* ===================
   SCHEDULE STYLES
   =================== */

.schedule-container {
    background: rgba(19, 33, 44, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.1);
    overflow: hidden;
}

.schedule-header {
    background: rgba(19, 33, 44, 0.98);
    padding: 20px 25px;
    border-bottom: 3px solid #B8B359;
}

.schedule-title {
    color: #fff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(19, 33, 44, 0.95);
}

.schedule-table thead {
    background: rgba(19, 33, 44, 0.98);
}

.schedule-table th {
    padding: 15px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.schedule-table th:first-child,
.schedule-table th:nth-child(2),
.schedule-table th:nth-child(3) {
    text-align: left;
}

.schedule-table .datetime-col {
    display: none;
}

@media (min-width: 769px) {
    .schedule-table .datetime-combined {
        display: none;
    }

    .schedule-table .datetime-col {
        display: table-cell;
    }

    /* Show desktop columns, hide mobile columns */
    .schedule-table .desktop-col {
        display: table-cell;
    }

    .schedule-table .mobile-col {
        display: none;
    }
}

.schedule-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.2s ease;
}

.schedule-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.schedule-table tbody tr:hover {
    background: rgba(184, 179, 89, 0.2);
}

.schedule-table td {
    padding: 18px 12px;
    text-align: center;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.schedule-table td:first-child,
.schedule-table td:nth-child(2),
.schedule-table td:nth-child(3) {
    text-align: left;
}

.schedule-table .team-name {
    font-weight: 600;
    color: #fff;
}

.schedule-table .score {
    font-weight: 700;
    font-size: 16px;
    color: #B8B359;
}

.schedule-table .played {
    color: #27ae60;
    font-style: italic;
}

.schedule-table .upcoming {
    color: #e67e22;
    font-style: italic;
}

.postponed {
    color: #e67e22 !important;
    font-style: italic;
    font-weight: 600;
}

.expand-btn {
    color: #B8B359;
    font-size: 16px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.expand-btn:hover {
    color: #fff;
    transform: scale(1.2);
}

.game-details td {
    border-bottom: none !important;
}

.goal-scorers-container {
    border-top: 2px solid #B8B359;
}

/* ===================
   NO DATA STYLES
   =================== */

.no-data {
    text-align: center;
    padding: 60px 40px;
    background: rgba(19, 33, 44, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 1.2em;
}

/* ===================
   SPONSORS SECTION
   =================== */

.sponsors {
    margin-top: 80px;
    padding: 40px 0;
    text-align: center;
}

.sponsors-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.sponsor-logo {
    height: 70px;
    max-width: 140px;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: grayscale(20%) brightness(1.1);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
    transform: translateY(-3px);
}


/* ===================
   RESPONSIVE DESIGN
   =================== */

/* Add body padding to account for fixed logo and nav */
body {
    padding-top: 200px;
    transition: padding-top 0.3s ease;
}

@media (max-width: 1024px) {
    .main-logo {
        width: 120px;
        height: 120px;
    }

    body {
        padding-top: 160px;
    }
}

@media (max-width: 768px) {
    .background-hero {
        background-attachment: scroll;
    }

    .main-logo {
        width: 100px;
        height: 100px;
    }

    body {
        padding-top: 140px;
    }

    .container {
        padding: 0 15px;
    }

    .section:first-child {
        margin-top: 20px;
    }

    .table th,
    .table td,
    .schedule-table th,
    .schedule-table td {
        padding: 10px 6px;
        font-size: 12px;
    }

    .table td:nth-child(2) {
        font-size: 13px;
    }

    .sponsors-grid {
        gap: 20px;
    }

    .sponsor-logo {
        height: 45px;
    }

}

@media (max-width: 480px) {
    .main-logo {
        width: 80px;
        height: 80px;
    }

    .mobile-sidebar {
        width: 280px;
        right: -280px;
    }

    body {
        padding-top: 120px;
    }

    .table-container,
    .schedule-container {
        margin: 0 -15px;
        border-radius: 0;
    }

    /* Show only essential columns on small screens: POS, TEAM, G, TD, PKT */
    .table th:nth-child(4),  /* S (Wins) */
    .table th:nth-child(5),  /* U (Draws) */
    .table th:nth-child(6),  /* N (Losses) */
    .table th:nth-child(7),  /* T (Goals For) */
    .table th:nth-child(8),  /* GT (Goals Against) */
    .table td:nth-child(4),
    .table td:nth-child(5),
    .table td:nth-child(6),
    .table td:nth-child(7),
    .table td:nth-child(8) {
        display: none;
    }

    /* Hide all normal columns on mobile */
    .schedule-table .desktop-col {
        display: none;
    }

    /* Show only mobile columns */
    .schedule-table .mobile-col {
        display: table-cell;
    }

    .mobile-nav-item {
        font-size: 14px;
        padding: 15px 0;
    }

    /* Contact form responsive */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* Contact form styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ===================
   FOOTER
   =================== */

.footer {
    background: rgba(19, 33, 44, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 10px 10px 0 0;
    padding: 20px;
    margin-top: 60px;
    text-align: center;
    border-top: 2px solid #B8B359;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #B8B359;
}

.admin-link-footer {
    opacity: 0.5;
    font-size: 12px;
    transition: opacity 0.3s ease;
}

.admin-link-footer:hover {
    opacity: 1;
    color: #B8B359;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Keep hamburger menu on all screen sizes */