/* ===========================================
   TrailMaster Pro - Common Styles
   Shared across all pages
============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5276;
    --primary-dark: #154360;
    --primary-light: #2e86c1;
    --secondary: #d4af37;
    --secondary-dark: #b7950b;
    --accent: #aed6f1;
    --background: #f8f9fa;
    --white: #ffffff;
    --text: #2c3e50;
    --text-light: #5d6d7e;
    --gray-light: #ecf0f1;
    --gray: #bdc3c7;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 15px;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--white);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    z-index: 1002;
}

.logo i {
    color: var(--secondary);
    font-size: 2rem;
}

.logo span {
    color: var(--text);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    position: relative;
    display: block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1002;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
}

.menu-toggle i {
    transition: var(--transition);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-toggle .fa-times {
    display: none;
    opacity: 0;
}

.menu-toggle.active .fa-bars {
    display: none;
    opacity: 0;
}

.menu-toggle.active .fa-times {
    display: block;
    opacity: 1;
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--secondary);
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.py-1 { padding: 1rem 0; }
.py-2 { padding: 2rem 0; }
.py-3 { padding: 3rem 0; }

/* ===========================================
   RESPONSIVE STYLES
============================================ */

@media (max-width: 768px) {
    h1 { 
        font-size: 2.2rem; 
        margin-bottom: 0.75rem;
    }
    
    h2 { 
        font-size: 1.8rem; 
        margin-bottom: 1rem;
    }
    
    h3 { 
        font-size: 1.5rem; 
        margin-bottom: 0.75rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        padding: 0 15px;
    }
    
    /* Menu Toggle Button - Visible on Mobile */
    .menu-toggle {
        display: flex;
    }
    
    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: 100vh;
        padding: 100px 2rem 2rem;
        text-align: center;
        transition: var(--transition-slow);
        box-shadow: var(--shadow-heavy);
        gap: 0;
        z-index: 1001;
        overflow-y: auto;
        margin: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text);
        border-radius: var(--border-radius);
        transition: var(--transition);
        margin: 0.25rem 0;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background-color: var(--primary);
        color: var(--white);
        transform: translateY(-2px);
    }
    
    .nav-link::after {
        display: none; /* Hide underline on mobile */
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* Add overlay when menu is open */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: -1;
    }
    
    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.7rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* Tablet devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.875rem;
        font-size: 0.95rem;
    }
}

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

/* Print styles */
@media print {
    .navbar {
        position: static;
        box-shadow: none;
    }
    
    .menu-toggle,
    .nav-link::after {
        display: none !important;
    }
    
    .nav-menu {
        position: static !important;
        display: flex !important;
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
    }
}