/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --primary-color: #d67414;
    --primary-hover: #ff9832;
    --background-dark: #171a28;
    --background-light: #2b2f42;
    --accent-gray: #3d4353;
    --text-white: #ffffff;
    --text-light: #95b6c9;
    --text-blue: #00a0ff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--background-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header and Navigation */
header {
    background-color: var(--background-light);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

.burger-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.burger-icon {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-white);
    margin: 2px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

/* Hide burger menu on desktop, show nav-links */
@media (min-width: 769px) {
    header {
        padding-bottom: 1rem;
    }

    nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-top {
        display: contents;
    }

    .logo {
        order: 1;
        margin-right: 0;
    }

    .burger-menu {
        position: static;
        display: flex;
        align-items: center;
        order: 2;
        flex: 1;
        justify-content: center;
        margin: 0 2rem;
    }

    .burger-icon {
        display: none;
    }

    .nav-links {
        position: static;
        display: flex;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        gap: 1.5rem;
    }

    .auth-buttons {
        order: 3;
        margin-left: auto;
    }

    .close-menu {
        display: none;
    }

    .nav-categories {
        display: contents;
    }

    .mobile-auth-buttons {
        display: none;
    }
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
}

nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

.auth-buttons a {
    background-color: transparent;
    border: 2px solid var(--text-white);
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-buttons a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000000;
}

.auth-buttons a.register {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-buttons a.register:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #000000;
}

/* Hero Section with responsive background image */
.hero {
    position: relative;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 2rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    min-height: 220px;
}

.hero-banner-desktop {
    display: block;
}

.hero-banner-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero-banner-desktop {
        display: none;
    }

    .hero-banner-mobile {
        display: block;
        min-height: 160px;
    }
}

@media (max-width: 480px) {
    .hero-banner-mobile {
        min-height: 140px;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

@media (min-width: 769px) {
    .hero-content {
        padding: 6rem 1rem;
        min-height: auto;
    }
}

.hero-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Section */
.content {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: var(--shadow);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h2 {
    color: var(--text-white);
    margin: 1.5rem 0 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

h3 {
    color: var(--text-light);
    margin: 1.2rem 0 0.8rem;
    font-size: 1.4rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: var(--text-light);
}

li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

/* Tables */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.2rem 0;
    background-color: var(--background-light);
    border-radius: 0.75rem;
    overflow: hidden;
    table-layout: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* Table wrapper for horizontal scroll on mobile */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.2rem 0;
}

th, td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--accent-gray);
    color: var(--text-white);
    word-break: break-word;
    font-size: 1rem;
}

th {
    background-color: var(--primary-color);
    color: var(--text-white);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-hover);
}

tr:last-child td {
    border-bottom: none;
}

tr {
    transition: background 0.2s;
}

tr:hover td {
    background-color: rgba(214, 116, 20, 0.08); /* subtle orange highlight */
}

/* CTA Buttons */
.cta-button {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    margin: 1rem 0;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px rgba(214, 116, 20, 0.2);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(214, 116, 20, 0.3);
}

.cta-section {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background-color: var(--background-light);
    color: var(--text-white);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--text-blue);
}

/* Close Menu Button */
.close-menu {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.close-menu span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-white);
    transition: var(--transition);
}

.close-menu span:first-child {
    transform: rotate(45deg);
}

.close-menu span:last-child {
    transform: rotate(-45deg);
}

.close-menu:hover span {
    background-color: var(--primary-color);
}

/* Responsive typography and spacing */
@media (max-width: 1200px) {
    .content {
        padding: 1.5rem;
    }
}

/* Medium screens (between tablet and desktop) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .nav-links {
        gap: 1.2rem;
    }

    nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
    }
}

/* Mobile Navigation */
@media (max-width: 768px) {
    header {
        padding-bottom: 1rem;
    }

    nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .nav-top {
        margin-bottom: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex: 1;
    }

    .logo img {
        height: 40px;
        max-width: 120px;
    }

    .logo {
        margin-right: 1rem;
    }

    .burger-menu {
        position: relative;
        display: flex;
        align-items: center;
    }

    .burger-icon {
        display: flex;
    }

    .close-menu {
        display: block;
    }

    .auth-buttons {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--background-light);
        flex-direction: column;
        align-items: stretch;
        padding: 4rem 0 2rem;
        transition: var(--transition);
        z-index: 100;
        overflow-y: auto;
        justify-content: flex-start;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-categories {
        display: flex;
        flex-direction: column;
        width: 100%;
        flex: 1;
    }

    .nav-categories a {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid var(--accent-gray);
        font-size: 1.1rem;
    }

    .mobile-auth-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 1rem;
        margin-top: auto;
        border-top: 2px solid var(--accent-gray);
    }

    .mobile-auth-buttons a {
        width: 100%;
        text-align: center;
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 8px;
        border: 2px solid var(--text-white);
        background-color: transparent;
    }

    .mobile-auth-buttons a.register {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .mobile-auth-buttons a:hover {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        color: #000000;
    }

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

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

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

    /* Content adjustments for mobile */
    .content {
        padding: 1.2rem;
        margin: 1rem;
        border-radius: 12px;
    }

    .hero {
        min-height: 160px;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

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

    .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .table-wrapper {
        margin: 1rem 0 1.5rem 0;
    }

    table {
        font-size: 0.98rem;
        margin: 0;
        border-radius: 0.5rem;
        min-width: 100%;
        display: table;
    }

    th, td {
        padding: 0.6rem 0.4rem;
        white-space: nowrap;
    }

    th:first-child, td:first-child {
        white-space: normal;
    }

    .cta-button {
        width: 37.5%;
        padding: 1.2rem;
        font-size: 1.1rem;
    }

    .hero-content .cta-button {
        width: 37.5%;
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    nav {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .content {
        padding: 2rem;
        margin: 1.5rem auto;
    }

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

    table {
        font-size: 0.95rem;
    }

    th, td {
        padding: 0.7rem 0.6rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    header {
        padding: 0.8rem;
    }

    nav {
        flex-wrap: wrap;
    }

    .auth-buttons {
        flex-direction: row;
        gap: 0.5rem;
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .auth-buttons a {
        width: auto;
        min-width: 90px;
        text-align: center;
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .content {
        padding: 1rem;
        margin: 0.8rem;
    }

    .hero {
        min-height: 140px;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.3rem;
        margin: 1.2rem 0 0.8rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    p, li {
        font-size: 0.9rem;
    }

    .table-wrapper {
        margin: 1rem 0;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.85rem;
        margin: 0;
        min-width: 500px;
    }

    th, td {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
        min-width: 90px;
    }

    th:first-child, td:first-child {
        min-width: 100px;
        white-space: normal;
    }

    .cta-button {
        width: 37.5%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .hero-content .cta-button {
        width: 37.5%;
        padding: 0.35rem 0.65rem;
        font-size: 0.6rem;
    }

    .cta-section {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    footer {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    header {
        padding-bottom: 3rem;
    }

    .logo img {
        height: 35px;
        max-width: 100px;
    }

    .auth-buttons a {
        min-width: 80px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .burger-menu {
        top: calc(100% + 0.3rem);
    }

    .auth-buttons {
        display: none;
    }

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

    .hero-content .cta-button {
        width: 37.5%;
        padding: 0.3rem 0.55rem;
        font-size: 0.55rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .content {
        padding: 0.8rem;
        margin: 0.5rem;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    nav {
        max-width: 1400px;
    }

    .content {
        max-width: 1400px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-dark: #171a28;
        --background-light: #2b2f42;
    }
}

/* Content link styles */
.content a, .content a:visited {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: inherit;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
    word-break: break-word;
}

.content a:hover, .content a:focus {
    color: var(--primary-hover);
    border-bottom: 2px solid var(--primary-hover);
    text-decoration: none;
}

/* Table cell links */
td a, th a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: inherit;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
}

td a:hover, th a:hover {
    color: var(--primary-hover);
    border-bottom: 2px solid var(--primary-hover);
} 