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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #0a1628;
    opacity: 0;
    transition: opacity 0.75s ease;    
}

body.loaded {
    opacity: 1;
}

h3 {
    font-size: 15px;
    text-align: center;
    color: #ff9965;
    padding: 10px 0 0 0;    
}

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

/* Header */
.site-header {
    background-color: #001735;
    padding: 20px 0 0 0;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 20px;
}

.tagline-left,
.tagline-right {
    flex: 1;
    font-size: 1rem;
    color: #d4af37;
    font-style: italic;
}

.tagline-left {
    text-align: left;
}

.tagline-right {
    text-align: right;
}

.logo-center {
    flex: 0 0 auto;
    text-align: center;
    padding: 0 40px;
    margin: 0 auto;
}

.logo-center img {
    max-width: 1000px;
    width: auto;
}

/* Navigation */
.main-nav {
    background-color: #0c203a;
    border-bottom: 2px solid #1a2a45;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
}

.main-nav.stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 10px 30px 10px 30px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.nav-menu > li > a:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.has-dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

/* Nested dropdown indicator - arrow points right */
.dropdown-menu .has-dropdown > a::after {
    content: ' ►';
    float: right;
    margin-left: 10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(10, 22, 40, 0.98);
    min-width: 290px;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 2px solid #d4af37;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.dropdown-menu .indent {
    border-top: 2px solid #d4af37 !important;
    left: 265px;
    top: 20px;
    background-color: #092050;    
}

.dropdown-menu li {
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #d4af37;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

.has-dropdown:hover > .dropdown-menu {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin: 10px auto;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: #d4af37;
    margin: 4px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.hero p {
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto 20px;
    line-height: 1.8;
    text-align: left;
}

.contact {
    max-width: 60%;
    background: #0b3951;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;    
    margin: 20px auto;
    font-size: 1.1rem;
}

.contact h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    font-weight: 700;    
}

/* Divisions Section */
.divisions {
    padding: 20px 20px;
    background-color: #0c203a;
}

.divisions .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.division-card {
    background: #0b3951;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.division-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.division-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 4px;
}

.division-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #eee;
}

.division-card p {
    font-size: 1rem;
    color: #eee;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: left;
}

/* Divisions Section */
.divisions-left-image {
    padding: 20px 60px;
    background-color: #0c203a;
}

.divisions-left-image a {
    color: #d39b0d;
}

.division-card-left-image {
    background: #0c203a;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
}

.division-card-left-image img {
    float: left;
    max-width: 300px;
    width: 40%;
    height: auto;
    margin-right: 30px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.division-card-left-image h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #f0ba48;
}

.division-card-left-image p {
    font-size: 1.15rem;
    color: #eee;
    margin-bottom: 15px;
    line-height: 1.7;
}

.division-card-left-image::after {
    content: "";
    display: table;
    clear: both;
}

.division-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Books Section */
.books {
    padding: 20px 20px;
    background-color: #0c203a;
}
.books .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.books-card {
    background: #0b3951;
    border-radius: 8px;
    padding: 10px 30px 20px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.books-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.books-card img {
    max-width: 60%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 4px;
}

.books-card h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #eee;
}
.books-card p {
    font-size: 1rem;
    color: #eee;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: justify;
}

/* New: Button container to anchor at bottom */
.books-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.books-cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.2s ease;
    text-align: center;
}
.books-cta-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Business Model Section */
.business-model {
    padding: 60px 20px;
    background-color: #fff;
    text-align: center;
}

.business-model h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

.business-model p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 15px;
    color: #666;
    line-height: 1.8;
    text-align: left;
}

/* Footer */
.site-footer {
    background-color: rgba(10, 22, 40, 0.98);
    padding: 20px 0;
    border-top: 3px solid #d4af37;
    text-align: center;
}

.site-footer a {
    color: #d39b0d;
    text-decoration: none;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 0 0 auto;
}

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

.footer-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 80px;
}

.footer-column h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

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

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ffff00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #7fb3e8;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-bottom p {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #ffff00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #7fb3e8;
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .header-top {
        padding: 0 20px 20px;
    }
    
    .tagline-left,
    .tagline-right {
        font-size: 0.9rem;
    }
    
    .logo-center {
        padding: 0 20px;
    }
}

@media (max-width: 1024px) {
    /* Hide taglines on tablets and phones */
    .tagline-left,
    .tagline-right {
        display: none !important;
    }
    
    /* Header layout - logo left, menu right */
    .site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10000 !important;
        background-color: #001735 !important;
    }
        
    .header-top {
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 10px 20px !important;
        gap: 10px !important;
    }
    
    .logo-center {
        flex: 0 0 auto !important;
        padding: 0 !important;
        text-align: left !important;
        order: 1;
    }
    
    .logo-center img {
        max-width: 800px !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        position: relative !important;
        margin: 0 auto !important;
        padding: 5px !important;
        order: 2;
    }
    
    /* Sticky nav - remove position sticky, header handles it */
    .main-nav {
        border-top: 2px solid #1a2a45;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li > a {
        padding: 12px 20px;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        border: none;
        border-top: 1px solid rgba(212, 175, 55, 0.3);
    }
    

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
        font-weight: 500;
    }

    /*.has-dropdown.active .dropdown-menu {
        display: block;
    } */

    .active {
        display: block;
    }

    .inactive {
        display: none;
    }

    /* Single column for book cards */
    .books .container {
        grid-template-columns: repeat(2, 1fr);
    }    

    /* Book layouts */
    .book-covers {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .book-detail {
        flex-direction: column;
    }
    
    .book-cover-large {
        flex: 0 0 auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .book-description h1 {
        text-align: center;
    }
    
    /* Community */
    .community-links {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Content */
    .content-box {
        padding: 25px;
    }
    
    .content-box h1 {
        font-size: 1.8rem;
    }
    
    .content-box h2 {
        font-size: 1.5rem;
    }
    
    /* Fix background for mobile sticky */
    .content-section {
        background-attachment: scroll;
    }
}

@media (max-width: 900px) {
    .logo-center img {
        max-width: 400px !important;
        display: block;
    }

    /* Single column for division cards */
    .divisions .container {
        grid-template-columns: 1fr;
    }

    .division-card-left-image img {
        display: none;
    }
    
    /* Single column for book cards */
    .books .container {
        grid-template-columns: 1fr;
    }    

    .books-cta-button {
        font-size: 14px;
    }
}

/* Small phones */
@media (max-width: 550px) {
    .logo-center img {
        max-width: 400px !important;
        display: block;
    }

    .hero h1 {
        font-size: 1.0rem;
        margin-bottom: 5px;
        font-weight: 500;
    }    

    .books-cta-button {
        font-size: 14px;
    }    

    .content-box {
        padding: 20px;
    }
    
    .content-box h1 {
        font-size: 1.5rem;
    }
    
    .content-box p {
        font-size: 1rem;
    }

.contact {
    max-width: 80%;
    font-size: 1.0rem;
}

.contact h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;    
}    
    
    .footer-logo img {
        max-height: 80px;
    }
}