/* ================== CSS VARIABLES ================== */
:root {
    /* Light Theme */
    --primary-color: #7A1E2C;
    --secondary-color: #4A5568;
    --accent-color: #C73E3E;
    --highlight-color: #E36262;
    --background-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-color: #a00a0a;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
    --primary-color: #922A3A;
    --secondary-color: #9CA3AF;
    --accent-color: #D94B4B;
    --highlight-color: #E67878;
    --background-color: #111827;
    --card-bg: #1F2937;
    --text-color: #F3F4F6;
    --text-light: #9CA3AF;
    --border-color: #374151;
    --shadow: 0 4px 12px rgba(0,0,0,0.6);
}

/* ================== BASE STYLES ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ================== TYPOGRAPHY ================== */
h1,h2,h3,h4,h5,h6 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ================== NAVIGATION ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(122,30,44,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(122,30,44,0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 42px;
    width: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
    border-color: var(--highlight-color);
}

.logo span {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

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

/* Nav Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

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

/* Nav Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-btn, .dropdown-btn, .mobile-menu-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover, .dropdown-btn:hover, .mobile-menu-btn:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: scale(1.05);
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    min-width: 200px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 1001;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: rgba(122,30,44,0.08);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Menu */
.mobile-menu-btn { display: none; }

.mobile-menu {
    position: fixed;
    top:0;
    right:-320px;
    width:320px;
    height:100vh;
    background:white;
    box-shadow:-5px 0 25px rgba(0,0,0,0.1);
    z-index:1001;
    transition: right 0.35s ease-in-out;
    padding:25px;
    overflow-y:auto;
}

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

.mobile-menu-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    padding-bottom:15px;
    border-bottom:1px solid var(--border-color);
}

.mobile-menu-header h3 {
    color: var(--primary-color);
    font-size:1.4rem;
    font-weight:600;
}

.close-menu-btn {
    background:none;
    border:none;
    font-size:1.6rem;
    color: var(--text-color);
    cursor:pointer;
    border-radius:50%;
    transition:all 0.3s ease;
}

.close-menu-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.mobile-nav-links { list-style:none; padding:0; margin:0; }
.mobile-nav-links li { margin-bottom:8px; }
.mobile-nav-links a {
    color: var(--text-color);
    font-size:1.1rem;
    text-decoration:none;
    padding:12px 16px;
    display:block;
    border-radius:8px;
    font-weight:500;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover, .mobile-nav-links a.active {
    background: rgba(122,30,44,0.1);
    color: var(--primary-color);
}

/* ================== FOOTER ================== */
/* ================= UPDATED FOOTER (NARROWER WIDTH) ================= */
footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 20px; /* slightly reduced padding */
    font-size: 0.95rem;
    position: relative;
}

.footer-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* slightly narrower */
    gap: 30px; /* reduced gap */
    max-width: 1000px; /* decreased from 1200px */
    margin: 0 auto;
}

.footer-content h4 {
    font-size: 1.2rem; /* slightly smaller */
    margin-bottom: 18px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-content p,
.footer-content a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    line-height: 1.8;
    margin-bottom: 8px;
    display: block;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--highlight-color);
}

/* Social Icons */
.footer-social {
    display: flex;
    gap: 10px; /* smaller gap */
    margin-top: 12px;
}

.footer-social a {
    width: 38px;  /* slightly smaller */
    height: 38px; /* slightly smaller */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 1rem; /* slightly smaller */
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--highlight-color);
    color: white;
    transform: scale(1.1);
}

/* Footer Bottom Text */
.footer-bottom {
    text-align: center;
    margin-top: 30px; /* slightly less margin */
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

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


/* Responsive */
@media (max-width: 768px) {
    .footer-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

/* ================== RESPONSIVE ================== */
@media(max-width:992px){
    .section-title{ font-size:2.2rem; }
    .footer-wrapper{ grid-template-columns:1fr 1fr; gap:30px; }
}

@media(max-width:768px){
    .section-title{ font-size:2rem; }
    .footer-wrapper{ grid-template-columns:1fr; text-align:center; gap:20px; }
    .footer-social{ justify-content:center; }
    .nav-links, .nav-icons .theme-btn, .nav-icons .dropdown{ display:none; }
    .mobile-menu-btn{ display:flex; }
}

@media(max-width:480px){
    .logo span{ font-size:1.3rem; }
    .logo img{ height:38px; width:38px; }
    .mobile-menu{ width:280px; padding:20px; }
}

/* ================== SCROLL FIX FOR NAVBAR ================== */
section { scroll-margin-top:90px; }
