/* ===========================================
   SITEGEN - Main Stylesheet v3.0
   Modern CSS with Ken Burns & Animation Effects
   Support for 3-level navigation menu
   =========================================== */

/* -------------------------------------------
   Google Fonts Import
   ------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Edu+QLD+Beginner:wght@400;500;600;700&display=swap');

/* -------------------------------------------
   CSS Variables
   ------------------------------------------- */
:root {
    /* Colors - Will be replaced by generator */
    --color-primary: #12687d;
    --color-secondary: #1a8fa8;
    --color-accent: #fd79a8;
    --color-background: #031C2A;
    --color-background-alt: #111111;
    --color-text: #ffffff;
    --color-text-muted: #b2bec3;
    --color-nav-bg: #031C2A;
    --color-footer-bg: #031C2A;
    --color-overlay: rgba(0, 0, 0, 0.35);
    
    /* Fonts */
    --font-primary: 'Cormorant SC', serif;
    --font-secondary: 'Edu QLD Beginner', cursive;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 1s ease;
    
    /* Shadows */
    --shadow-md: 0 5px 50px 15px rgba(0, 0, 0, 0.2);
    --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------
   Reset & Base
   ------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.3;
    font-weight: 700;
}

p {
    font-family: var(--font-secondary);
    color: var(--color-text);
    font-size: 15px;
    line-height: 2;
    font-weight: 400;
}

a {
    transition-duration: var(--transition-normal);
    text-decoration: none;
    outline: 0 solid transparent;
    color: var(--color-text);
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-primary);
}

a:hover, a:focus {
    color: rgba(255, 255, 255, 0.7);
}

ul, ol {
    margin: 0;
    list-style: none;
}

img {
    height: auto;
    max-width: 100%;
}

/* -------------------------------------------
   Utility Classes
   ------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center { text-align: center; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

/* Spacing utilities */
.mt-50 { margin-top: 50px !important; }
.mb-30 { margin-bottom: 30px !important; }
.pt-5 { padding-top: 3rem !important; }

/* -------------------------------------------
   Preloader
   ------------------------------------------- */
.preloader {
    background-color: #ffffff;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader .spinner {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.preloader .spinner div {
    position: absolute;
    top: 27px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #000000;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.preloader .spinner div:nth-child(1) {
    left: 6px;
    animation: spinner1 0.6s infinite;
}

.preloader .spinner div:nth-child(2) {
    left: 6px;
    animation: spinner2 0.6s infinite;
}

.preloader .spinner div:nth-child(3) {
    left: 26px;
    animation: spinner2 0.6s infinite;
}

.preloader .spinner div:nth-child(4) {
    left: 45px;
    animation: spinner3 0.6s infinite;
}

@keyframes spinner1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes spinner2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(19px, 0); }
}

@keyframes spinner3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

/* -------------------------------------------
   Header & Navigation
   ------------------------------------------- */
.header {
    position: absolute;
    z-index: 1000;
    width: 100%;
    top: 20px;
    left: 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    background-color: transparent;
}

.header.sticky {
    position: fixed;
    top: 0;
    background-color: var(--color-nav-bg);
    box-shadow: var(--shadow-md);
}

.header.sticky .container {
    background-color: transparent;
}

/* Logo */
.logo img {
    max-width: 130px;
    height: auto;
}

/* Main Navigation */
.main-nav > ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    color: var(--color-text);
    font-weight: 700;
    text-transform: capitalize;
    font-size: 15px;
    transition: color var(--transition-fast);
}

.main-nav > ul > li > a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Dropdown indicators */
.main-nav > ul > li.has-dropdown > a .fa-chevron-down,
.main-nav .dropdown .has-subdropdown > a .fa-chevron-right {
    font-size: 12px;
    margin-left: 5px;
    transition: transform var(--transition-fast);
}

/* Dropdown Menu (Level 2) */
.main-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #ffffff;
    box-shadow: var(--shadow-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    padding: 10px 0;
    z-index: 100;
}

.main-nav > ul > li:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .dropdown li {
    position: relative;
}

.main-nav .dropdown li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    color: #232323;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.main-nav .dropdown li a:hover {
    color: #888888;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Sub-Dropdown Menu (Level 3) */
.main-nav .sub-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 220px;
    background-color: #ffffff;
    box-shadow: var(--shadow-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all var(--transition-fast);
    padding: 10px 0;
    z-index: 101;
}

.main-nav .dropdown .has-subdropdown:hover > .sub-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.main-nav .sub-dropdown li a {
    padding: 8px 20px;
    color: #232323;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.main-nav .sub-dropdown li a:hover {
    color: #888888;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Dropdown positioning for right edge */
.main-nav > ul > li.has-dropdown:last-child .dropdown,
.main-nav .dropdown li.has-subdropdown:last-child .sub-dropdown {
    left: auto;
    right: 0;
}

.main-nav .dropdown li.has-subdropdown:last-child .sub-dropdown {
    left: auto;
    right: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    transition: all var(--transition-fast);
}

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

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

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

/* -------------------------------------------
   Hero Section / Slider
   ------------------------------------------- */
.hero {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 0 30px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Slide transition animation */
.hero-slide.fade-in {
    animation: fadeIn 1s ease forwards;
}

.hero-slide.fade-out {
    animation: fadeOut 1s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Background with Ken Burns Effect */
.hero-slide .background {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -10;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: kenBurns 12s linear infinite;
}

/* Ken Burns zoom effect */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Dark overlay - semi-transparent for brightness */
.hero-slide::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: var(--color-overlay);
    z-index: -5;
}

/* Slide Content */
.hero-slide .content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

/* Subtitle */
.hero-slide .subtitle {
    font-size: 18px;
    color: var(--color-text);
    letter-spacing: 20px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
    animation-delay: 0.1s;
}

/* Title with sonar effect */
.hero-slide .title {
    position: relative;
    z-index: 1;
    font-size: 60px;
    color: var(--color-text);
    margin-bottom: 0;
    font-weight: 400;
    display: block;
    text-transform: capitalize;
    letter-spacing: 30px;
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
    animation-delay: 0.3s;
}

/* Text sonar/pulse effect */
.hero-slide .title span {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    left: 0;
    color: rgba(255, 255, 255, 0.59);
    animation: textSonar 6s linear infinite;
}

@keyframes textSonar {
    0% {
        transform: scaleX(1);
    }
    50% {
        transform: scaleX(1.15);
    }
    100% {
        transform: scaleX(1);
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider Navigation Dots */
.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.slider-nav .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-nav .dot.active,
.slider-nav .dot:hover {
    background-color: var(--color-text);
    transform: scale(1.2);
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-fast);
}

.slider-arrow:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* -------------------------------------------
   Buttons
   ------------------------------------------- */
.btn {
    display: inline-block;
    min-width: 212px;
    height: 49px;
    line-height: 47px;
    padding: 0 30px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    text-transform: capitalize;
    border: 1px solid var(--color-text);
    background-color: transparent;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
    animation-delay: 0.5s;
}

.btn i {
    margin-left: 5px;
}

.btn:hover, .btn:focus {
    background-color: var(--color-text);
    color: var(--color-background);
}

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

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

/* -------------------------------------------
   Sections
   ------------------------------------------- */
.section {
    padding: 100px 0;
}

.section-heading {
    position: relative;
    z-index: 1;
    margin-bottom: 100px;
    text-align: center;
}

.section-heading p {
    color: var(--color-text);
    font-size: 14px;
    margin-bottom: 5px;
}

.section-heading h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 10px;
    margin-bottom: 0;
}

/* -------------------------------------------
   Footer
   ------------------------------------------- */
.footer {
    background-color: var(--color-footer-bg);
    padding: 50px 0 30px;
}

.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.footer-brand {
    text-align: center;
}

.footer-brand img {
    height: 90px;
    margin-bottom: 20px;
}

.footer-copyright {
    color: var(--color-text);
    font-size: 14px;
}

.footer-copyright a {
    color: var(--color-primary);
}

.footer-copyright i.fa-heart {
    color: #e74c3c;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
}

.footer-nav a {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 600;
    transition: color var(--transition-fast);
}

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

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
}

/* -------------------------------------------
   Scroll Up Button
   ------------------------------------------- */
#scrollUp {
    position: fixed;
    background-color: var(--color-background);
    border-radius: 0;
    bottom: 50px;
    right: 50px;
    box-shadow: 0 1px 5px 2px rgba(0, 0, 0, 0.15);
    color: var(--color-text);
    font-size: 24px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    width: 40px;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

#scrollUp.visible {
    opacity: 1;
    visibility: visible;
}

#scrollUp:hover {
    background-color: var(--color-text);
    color: var(--color-background);
}

/* -------------------------------------------
   Mobile Navigation Styles (3 Levels)
   ------------------------------------------- */
@media only screen and (max-width: 991px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-nav-bg);
        padding: 100px 30px 30px;
        transition: left var(--transition-fast);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav > ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav > ul > li > a {
        padding: 15px 0;
        justify-content: space-between;
    }
    
    /* All dropdowns become accordions on mobile */
    .main-nav .dropdown,
    .main-nav .sub-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: transparent;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-fast);
        padding: 0;
        width: 100%;
        border: none;
    }
    
    .main-nav .dropdown li,
    .main-nav .sub-dropdown li {
        border: none;
    }
    
    .main-nav > ul > li.open > .dropdown,
    .main-nav .dropdown li.open > .sub-dropdown {
        max-height: 1000px;
    }
    
    /* Style for dropdown items on mobile */
    .main-nav .dropdown li a {
        color: var(--color-text);
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav .sub-dropdown li a {
        color: var(--color-text);
        padding: 12px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Chevron rotation for open state */
    .main-nav > ul > li.has-dropdown.open > a .fa-chevron-down,
    .main-nav .dropdown .has-subdropdown.open > a .fa-chevron-right {
        transform: rotate(90deg);
    }
    
    /* Adjust spacing for nested levels */
    .main-nav .dropdown {
        margin-left: 15px;
    }
    
    .main-nav .sub-dropdown {
        margin-left: 30px;
    }
    
    .hero-slide .title {
        font-size: 42px;
        letter-spacing: 15px;
    }
    
    .hero-slide .subtitle {
        letter-spacing: 10px;
    }
    
    .slider-arrow {
        display: none;
    }
}

@media only screen and (max-width: 767px) {
    .header .container {
        height: 70px;
    }
    
    .hero-slide {
        height: 500px;
    }
    
    .hero-slide .background {
        height: 500px;
    }
    
    .hero-slide::after {
        height: 500px;
    }
    
    .hero-slide .title {
        font-size: 30px;
        letter-spacing: 5px;
    }
    
    .hero-slide .subtitle {
        font-size: 14px;
        letter-spacing: 5px;
    }
    
    .btn {
        min-width: 180px;
        height: 45px;
        line-height: 43px;
        padding: 0 20px;
        font-size: 14px;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    #scrollUp {
        right: 30px;
        bottom: 30px;
    }
}

@media only screen and (max-width: 480px) {
    .hero-slide .title {
        font-size: 24px;
        letter-spacing: 3px;
    }
    
    .hero-slide .subtitle {
        font-size: 12px;
        letter-spacing: 3px;
    }
}

/* -------------------------------------------
   Background Overlay Utility
   ------------------------------------------- */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
}

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

/* -------------------------------------------
   Settings Button (for index.html)
   ------------------------------------------- */
.settings-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.settings-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}