/* ============================ GLOBAL STYLES ============================ */
:root {
    --primary-color: #6072FE;
    --secondary-color: #9D7AC7;
    --text-color: #777;
    --font-heading: Garamond, serif;
    --font-body: Lato, sans-serif;
}

body {
    font: 400 15px/1.8 var(--font-body);
    color: var(--text-color);
    padding-top: 70px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

body.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

h1, h2, h3, h4 {
    margin: 0;
    padding: 0;
    font-family: var(--font-heading);
    color: inherit;
    letter-spacing: normal;
}

.carousel-title {
    font-size: 36px;
    color: blue;
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 5px;
}

/* ============================ NAVBAR STYLES ============================ */
.navbar-default {
    font-family: var(--font-heading);
    background-color: white;
    border-color: black;
    opacity: 0.95;
    margin-bottom: 10px;
    border-width: 1px;
    font-size: 20px;
    letter-spacing: 2px;
    z-index: 999;
}

.navbar-default .navbar-nav > li > a {
    color: var(--primary-color);
    padding: 18px 18px;
    font-family: var(--font-heading);
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    background-color: var(--secondary-color);
    color: white;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    background-color: #007bff;
    color: white;
}

.navbar-default .navbar-toggle {
    border-color: blue;
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: blue;
}

/* ============================ DROPDOWN STYLES ============================ */
.navbar-default .navbar-nav > li > .dropdown-menu {
    background-color: #F1F4F7;
    border-color: blue;
    font-family: var(--font-heading);
    font-size: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.navbar-default .navbar-nav > li > .dropdown-menu > li > a {
    color: #333;
    padding: 8px 12px;
    font-family: var(--font-heading);
}

.navbar-default .navbar-nav > li > .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav > li > .dropdown-menu > li > a:focus {
    background-color: var(--secondary-color);
    color: white;
}

.navbar-default .navbar-nav > li > .dropdown-menu > li.divider {
    background-color: #ccc;
    height: 1px;
    margin: 5px 0;
}

/* Submenu styling */
.dropdown-submenu {
    position: relative;
    font-family: var(--font-heading);
    font-size: 20px;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
    position: absolute;
    background-color: #e6f2ff;
    border-color: blue;
}

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

.dropdown-submenu > .dropdown-menu > li > a {
    color: #003366;
    padding: 8px 12px;
}

.dropdown-submenu > .dropdown-menu > li > a:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Mobile overrides */
@media (max-width: 767px) {
    .dropdown-submenu > .dropdown-menu {
        position: relative;
        left: 0;
        top: 0;
        margin-left: 15px;
        display: none;
    }
    
    .dropdown-submenu.open > .dropdown-menu {
        display: block;
    }
    
    .navbar-default .navbar-nav .open .dropdown-menu > li > a {
        color: blue;
        background-color: #C3D1D9;
        font-size: 20px;
    }
    
    .navbar-default .navbar-nav .open .dropdown-menu > li.active > a {
        background-color: #8167a9;
        color: white;
    }
    
    .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover {
        background-color: var(--secondary-color);
        color: white;
    }
}

/* ============================ HOME SECTIONS ============================ */
.featured-photo {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 60px 0;
}

.featured-photo-inner {
    background: #f2f2f2;
    padding: 20px;
    border: 6px solid #111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    max-width: 1200px;
    width: 90%;
    position: relative;
}

.featured-photo-inner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 2px;
}

.featured-overlay {
    position: absolute;
    bottom: 25px;
    left: 35px;
    color: white;
    text-shadow: 0 3px 6px rgba(0,0,0,0.7);
}

.featured-overlay h2 {
    font-size: 32px;
    margin: 0;
    font-family: var(--font-heading);
}

.featured-overlay p {
    font-size: 18px;
    margin-top: 5px;
}

.state-grid-section {
    padding: 60px 20px;
    text-align: center;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    font-family: var(--font-heading);
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.state-card {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.state-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: none !important;
}

.state-card:hover img {
    transform: scale(1.05);
    filter: brightness(70%);
}

.state-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.state-label {
    position: absolute;
    bottom: 15px;
    left: 20px;
    color: white;
    font-size: 22px;
    font-family: var(--font-heading);
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.view-all-button {
    margin-top: 35px;
    margin-bottom: 5px;
}

.view-all-button a {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.view-all-button a:hover {
    background: #4a5bd1;
}

.global-teaser {
    text-align: center;
    font-size: 16px;
    font-style: italic;
    color: #555;
    margin-top: 5px;
    margin-bottom: 5px;
}

.about-teaser {
    padding: 60px 20px;
    background: #f7f7f7;
    text-align: center;
}

.about-teaser h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.about-teaser p {
    max-width: 700px;
    margin: 0 auto 30px auto;
    font-size: 18px;
    color: #555;
}

.about-button {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.about-button:hover {
    background: #4a5bd1;
    color: white;
    text-decoration: none;
    box-shadow: 0 0 12px rgba(96, 114, 254, 0.6);
}

.disabled-link {
    pointer-events: none;
    color: #999;
    cursor: default;
}

/* ============================ CAROUSEL STYLES ============================ */
.carousel-inner img {
    -webkit-filter: grayscale(35%);
    filter: grayscale(40%);
    width: 100%;
    margin-top: 45px;
}

.carousel-caption h3 {
    color: #fff !important;
}

@media (max-width: 600px) {
    .carousel-caption {
        display: none;
    }
}

.carousel-control {
    cursor: pointer;
}

.carousel-indicators li {
    border-color: white;
    background-color: transparent;
}

.carousel-indicators .active {
    background-color: white;
}

/* ============================ CAROUSEL ANIMATIONS ============================ */
#myCarousel {
    border: 6px solid #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

#myCarousel .carousel-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-top: 0;
    transform-origin: center;
    filter: none;
}

/* Base state for all slides */
.carousel-inner > .item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out;
}

/* Active slide */
.carousel-inner > .active {
    position: relative;
    opacity: 1;
    transform: translateX(0);
    transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out;
}

/* Slide out left */
.carousel-inner > .active.left {
    transform: translateX(-100%);
    opacity: 0;
}

/* Incoming slide */
.carousel-inner > .next {
    transform: translateX(100%);
    opacity: 0;
}

.carousel-inner > .next.left {
    transform: translateX(0);
    opacity: 1;
}

/* Zoom effect on active image */
.carousel-inner > .active img {
    animation: zoomIn 4s ease-out forwards;
    animation-delay: 0.3s;
}

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

/* Remove Bootstrap overrides */
.carousel-inner > .item,
.carousel-inner > .active,
.carousel-inner > .next,
.carousel-inner > .prev,
.carousel-inner > .next.left,
.carousel-inner > .prev.right,
.carousel-inner > .active.left,
.carousel-inner > .active.right {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}