/* 
 * Crown Equities Inc. - Premium Corporate Theme
 * Colors extracted from logo and screenshots
 */
:root {
    --cei-red: #aa3c3c;       /* Deep Crimson */
    --cei-red-dark: #6b1818;  /* Dark Crimson */
    --cei-black: #2b2b2b;     /* Solid Charcoal */
    --cei-gold: #c29a4a;      /* Rich Gold */
    --cei-gold-light: #d4af66; /* Light Gold */
    --cei-navy: #1a2b4c;      /* Deep Corporate Navy */
    --cei-navy-dark: #0f1a30; /* Darker Navy */
    --cei-light: #f8f9fa;     /* Crisp Off-White */
    --cei-gray: #5a6268;      /* Readable Gray */
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--cei-black);
    background-color: var(--cei-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--cei-navy);
}

/* Navbar Styling */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-brand img {
    height: 50px; 
}

.nav-link {
    font-weight: 500;
    color: var(--cei-navy) !important;
    margin-left: 1.5rem;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--cei-red) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--cei-red);
    transition: width 0.3s;
}

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

/* Dropdown Menu Styling */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #ffffff;
    padding: 0.5rem 0;
    margin-top: 10px; /* Space between nav link and dropdown */
    min-width: 220px;
    animation: fadeInDropdown 0.3s ease;
}

.dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cei-navy);
    padding: 0.7rem 1.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(178, 34, 34, 0.05); /* Light red tint */
    color: var(--cei-red);
    border-left-color: var(--cei-red);
    padding-left: 1.8rem; /* Slight shift to right */
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--cei-red);
    color: white;
    border-left-color: var(--cei-red-dark);
}

/* Add a small arrow on top of dropdown */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.05);
    border-left: 1px solid rgba(0,0,0,0.05);
    z-index: -1;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar List Group Active State Override */
.list-group-item.active {
    background-color: var(--cei-red) !important;
    border-color: var(--cei-red) !important;
    color: white !important;
}

/* 
   -----------------------------
   HERO CAROUSEL STYLES 
   -----------------------------
*/
#heroCarousel {
    height: 100vh; /* Force full screen height */
    overflow: hidden;
    position: relative;
    margin-top: -76px; /* Pull it up behind the navbar */
}

.carousel-inner, .carousel-item {
    height: 100%; /* Important for background image to fill */
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Centering the caption */
.carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* Stretches the container to full height */
    z-index: 10;
    padding-bottom: 3rem;
    
    /* Flexbox for centering is handled by d-flex class in HTML, 
       but we ensure the container allows it */
}

/* Carousel Indicators */
.carousel-indicators [data-bs-target] {
    background-color: var(--cei-gold);
    height: 4px;
}


/* Cards / Features */
.feature-card {
    border: none;
    border-radius: 0; 
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white; 
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon-box {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--cei-navy); 
    color: white;
    font-size: 3rem;
}

/* Specific colors for the cards to match screenshots */
.bg-real-estate { 
    background: linear-gradient(135deg, var(--cei-navy) 0%, var(--cei-navy-dark) 100%);
    border-bottom: 5px solid var(--cei-gold);
}
.bg-health-care { 
    background: linear-gradient(135deg, #243545 0%, #16202a 100%);
    border-bottom: 5px solid var(--cei-gold);
}
.bg-private-equity { 
    background: linear-gradient(135deg, var(--cei-red) 0%, var(--cei-red-dark) 100%);
    border-bottom: 5px solid var(--cei-gold);
}


.feature-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 1rem;
    position: relative;
    display: inline-block;
}

/* Footer */
footer {
    background-color: white;
    padding: 2rem 0;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-size: 0.9rem;
    color: var(--cei-gray);
}

.footer-copyright {
    color: var(--cei-red);
    font-weight: 600;
}

/* Buttons */
.btn-primary-cei {
    background-color: var(--cei-red);
    border-color: var(--cei-red);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px; /* Pill shape for modern feel */
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary-cei:hover {
    background-color: #921b1b;
    border-color: #921b1b;
    transform: translateY(-2px);
}

/* Home Announcement Notice */
.announcement-notice {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 360px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.96);
    color: var(--cei-navy);
    border: 1px solid rgba(26, 43, 76, 0.12);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.announcement-notice:hover {
    transform: translateY(-2px);
    color: var(--cei-navy);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.announcement-notice-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(178, 34, 34, 0.08);
    color: var(--cei-red);
    font-size: 1rem;
}

.announcement-notice-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.announcement-notice-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cei-navy);
    line-height: 1.2;
}

.announcement-notice-chevron {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(26, 43, 76, 0.06);
    color: var(--cei-gray);
    font-size: 0.78rem;
}

/* Announcements */
.announcement-feed {
    background: #ffffff;
}

.announcement-kicker {
    color: var(--cei-gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.announcement-heading {
    color: var(--cei-navy);
    font-size: 2rem;
}

.announcement-card {
    background: #ffffff;
    border: 1px solid rgba(26, 43, 76, 0.12);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(26, 43, 76, 0.08);
    display: flex;
    flex-direction: column;
}

.announcement-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #eef2f7;
}

.announcement-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.announcement-date {
    color: var(--cei-red);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.announcement-body h4 {
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.announcement-caption {
    color: var(--cei-gray);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.announcement-text {
    color: #3f4854;
    font-size: 0.95rem;
}

.announcement-read-more {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.35rem 1rem;
}

.announcement-modal .modal-content {
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.announcement-modal .modal-header {
    align-items: flex-start;
    border-bottom: 1px solid rgba(26, 43, 76, 0.12);
}

.announcement-modal .modal-title {
    color: var(--cei-navy);
    line-height: 1.3;
}

.announcement-modal-image {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    background: #eef2f7;
}

.announcement-modal-caption {
    color: var(--cei-gray);
    font-weight: 700;
    font-size: 1.05rem;
}

.announcement-modal-text {
    color: #3f4854;
    line-height: 1.75;
    white-space: normal;
}

/* Mobile Responsiveness */
/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Adjust Hero Text for Mobile */
    .hero-content h1, 
    .display-3 {
        font-size: 2rem !important; /* Smaller heading to fit narrow screens */
        word-wrap: break-word; /* Prevent overflow */
    }
    
    .hero-content p, 
    .lead {
        font-size: 1rem !important;
    }
    
    /* Add padding to the inner container of carousel caption */
    .carousel-caption > .text-center {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
    }
    
    .carousel-caption h5 {
        font-size: 0.8rem;
        letter-spacing: 2px !important;
    }

    /* Adjust buttons on mobile */
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        width: 80%; /* Make buttons wider on mobile for easier tapping */
    }

    /* Adjust Feature Cards */
    .feature-icon-box {
        height: 150px; /* Shorter cards */
        font-size: 2rem;
    }
    
    .feature-title {
        font-size: 1.1rem;
    }
    
    /* Ensure no horizontal overflow */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Adjust about images on mobile */
    .col-6 img {
        height: 120px !important;
    }
    
    /* Adjust navbar brand/logo on mobile */
    .navbar-brand img {
        height: 40px !important;
    }

    .announcement-heading {
        font-size: 1.6rem;
    }

    .announcement-body {
        padding: 1.1rem;
    }

    .announcement-modal-image {
        max-height: 48vh;
    }

    .announcement-notice {
        top: 86px;
        right: 12px;
        bottom: auto;
        left: auto;
        max-width: calc(100vw - 24px);
        min-width: 0;
        padding: 10px 12px;
    }
}
/* Back to Top Button Styles */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    padding: 10px 15px;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--cei-gold); /* Change color on hover for feedback */
    border-color: var(--cei-gold);
}
