/********** Miraal Custom Styles - Restructured **********/

/* ========================================
   CSS VARIABLES & UTILITIES
   ======================================== */

:root {
    --transition-speed: 0.3s ease;
    --transition-slow: 0.5s ease;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 0 45px rgba(0, 0, 0, 0.05);
    --border-light: 1px solid #dee2e6;
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-light: rgba(255, 255, 255, 0.5);
    --overlay-lighter: rgba(255, 255, 255, 0.9);
}

/* ========================================
   LOADING & UTILITY COMPONENTS
   ======================================== */

/* Loading Spinner */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow) ease-out, visibility 0s linear 0.5s;
    z-index: 99999;
}

#spinner.show {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--transition-slow) ease-out, visibility 0s linear 0s;
}

/* Back to Top Button */
.back-to-top {
    position: fixed !important;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.font-work-sans {
    font-family: "Work Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.font-playfair-display {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.font-dancing-script {
    font-family: "Dancing Script", cursive;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* ========================================
   BUTTON COMPONENTS
   ======================================== */

.btn {
    position: relative;
    transition: var(--transition-slow);
}

/* Square Button Variants */
.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/* Primary Button Styles */
.btn-primary {
    border: 2px solid var(--bs-primary);
    background: transparent;
    color: var(--bs-primary);
    transition: all var(--transition-speed);
    margin: 10px;
}

.btn-primary:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Dark Button Styles */
.btn-dark {
    border: 2px solid var(--bs-dark);
    background: transparent;
    color: var(--bs-dark);
    transition: all var(--transition-speed);
    margin: 10px;
}

.btn-dark:hover {
    background: var(--bs-dark);
    color: var(--bs-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* ========================================
   NAVIGATION & HEADER
   ======================================== */

/* Header Container */
.header-container {
    background: var(--bs-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-slow);
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: var(--bs-light);
}

/* Brand Logo */
.brand-logo {
    padding: 1.5rem 3rem;
    margin-right: 0;
    text-decoration: none;
}

.logo-image {
    width: 230px;
    height: auto;
    max-width: 100%;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
    margin-left: auto;
    margin-right: 1.5rem;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 6px;
    color: var(--bs-primary);
    text-decoration: none;
    transition: var(--transition-speed);
    cursor: pointer;
    font-size: 1rem;
}

.lang-dropdown-btn:hover {
    border-color: var(--bs-primary);
    background: rgba(254, 161, 22, 0.1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.lang-dropdown-btn:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(254, 161, 22, 0.2);
}

.language-dropdown .dropdown-menu {
    min-width: 140px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    background: var(--bs-white);
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-speed);
    font-size: 0.9rem;
}

.language-dropdown .dropdown-item:hover {
    background: rgba(254, 161, 22, 0.1);
    color: var(--bs-primary);
}

.language-dropdown .dropdown-item.active {
    background: var(--bs-primary);
    color: var(--white);
    font-weight: 500;
}

.language-dropdown .dropdown-item.active:hover {
    background: var(--bs-primary);
    color: var(--white);
}

.language-dropdown .lang-dropdown-btn {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-dropdown .fas.fa-chevron-down {
    font-size: 0.8rem;
    margin-left: 0.25rem;
    transition: var(--transition-speed);
}

.lang-dropdown-btn[aria-expanded="true"] .fas.fa-chevron-down {
    transform: rotate(180deg);
}

/* Responsive Language Dropdown */
@media (max-width: 768px) {
    .language-dropdown {
        margin-right: 1rem;
    }
    
    .lang-dropdown-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .language-dropdown .dropdown-menu {
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .language-dropdown {
        margin-right: 0.5rem;
    }
    
    .lang-dropdown-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .language-dropdown .dropdown-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    margin-right: 1.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.toggle-icon {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--bs-dark);
    position: relative;
    transition: var(--transition-speed);
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 2px;
    background: var(--bs-dark);
    transition: var(--transition-speed);
}

.toggle-icon::before {
    top: -6px;
}

.toggle-icon::after {
    bottom: -6px;
}

/* Navigation Content */
.nav-content {
    padding: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    margin-left: auto;
}

.social-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    text-decoration: none;
    margin-right: 0.75rem;
    transition: all var(--transition-speed);
    border-radius: 0;
}

.social-btn:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
    transform: translateY(-3px);
}

.social-btn:last-child {
    margin-right: 0;
}

/* Sticky Navigation */
.sticky-top {
    top: -150px;
    transition: var(--transition-slow);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-header {
    background: url(../img/hero-bg.jpg) top left no-repeat;
    background-size: cover;
}

/* Hero Responsive Layout */
@media (min-width: 992px) {
    .hero-header .container {
        max-width: 100% !important;
    }

    .hero-header .hero-header-text {
        padding-left: calc(((100% - 960px) / 2) + 0.75rem);
    }
}

@media (min-width: 1200px) {
    .hero-header .hero-header-text {
        padding-left: calc(((100% - 1140px) / 2) + 0.75rem);
    }
}

@media (min-width: 1400px) {
    .hero-header .hero-header-text {
        padding-left: calc(((100% - 1320px) / 2) + 0.75rem);
    }
}

/* Hero Carousel Navigation */
.header-carousel .owl-nav {
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: center;
    display: flex;
    justify-content: center;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    position: relative;
    margin-left: 2px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-dark);
    background: var(--bs-primary);
    font-size: 22px;
    transition: var(--transition-slow);
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    color: var(--bs-white);
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    background: url(../img/page-header.jpg) center center no-repeat;
    background-size: contain;
}

/* ========================================
   SERVICE SECTION
   ======================================== */

/* Service Item Responsive */
@media (max-width: 768px) {
    .service .service-item {
        border: none !important;
        box-shadow: var(--shadow-medium);
    }
}

@media (min-width: 992px) {
    .service .service-item.border-lg-end {
        border-right: var(--border-light);
    }

    .service .service-item.border-lg-end-0 {
        border-right: none !important;
    }

    .service .service-item.border-lg-bottom-0 {
        border-bottom: none !important;
    }
}

/* Service Item Buttons */
.service .service-item .btn-primary {
    border-width: 2px;
    background: var(--bs-white);
}

.service .service-item .btn-primary:hover {
    background: var(--bs-primary);
}

/* Service Item Images */
.service .service-item img {
    width: 70px;
    margin-bottom: 20px;
}

/* ========================================
   PRICING SECTION
   ======================================== */

.price .price-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
}

/* ========================================
   BLOG SECTION
   ======================================== */

.blog .btn-dark {
    border-width: 2px;
    background: var(--bs-primary);
    color: var(--bs-dark);
}

.blog .btn-dark:hover {
    background: var(--bs-dark);
    color: var(--bs-white);
}

/* ========================================
   GALLERY SECTION
   ======================================== */

.gallery .gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery .gallery-item img {
    transition: var(--transition-slow);
}

.gallery .gallery-item:hover img {
    transform: scale(1.2);
}

.gallery .gallery-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--overlay-dark);
    transition: var(--transition-slow);
    z-index: 1;
}

.gallery .gallery-item:hover .gallery-icon {
    width: 100%;
    height: 100%;
}

.gallery .gallery-icon .btn {
    opacity: 0;
    transition: var(--transition-slow);
}

.gallery .gallery-item:hover .gallery-icon .btn {
    opacity: 1;
    transition-delay: 0.5s;
}

/* ========================================
   TEAM SECTION
   ======================================== */

.team {
    position: relative;
}

.team::before {
    position: absolute;
    content: "";
    width: 200%;
    height: 200px;
    top: 50%;
    left: -50%;
    transform: translateY(-50%);
    margin-top: 1rem;
    background: var(--bs-primary);
}

.team-item img {
    transition: var(--transition-slow);
}

.team-item:hover img {
    transform: scale(1.2);
}

.team-overlay {
    position: absolute;
    padding: 30px;
    right: 30px;
    bottom: 30px;
    left: 30px;
    text-align: center;
    background: var(--overlay-light);
    transition: var(--transition-slow);
    z-index: 1;
}

.team-item:hover .team-overlay {
    background: var(--overlay-lighter);
}

.team-overlay p {
    letter-spacing: 1px;
}

.team-overlay .btn-dark {
    border-width: 2px;
    color: var(--bs-dark);
    background: transparent;
}

.team-overlay .btn-dark:hover {
    color: var(--bs-white);
    background: var(--bs-dark);
}

/* ========================================
   BENEFITS CAROUSEL
   ======================================== */

.benefits-carousel .owl-item {
    position: relative;
}

.benefits-carousel .owl-item img {
    position: relative;
    width: 100px;
    height: 100px;
    z-index: 1;
}

.benefits-carousel .owl-item,
.benefits-carousel .owl-item * {
    transition: var(--transition-slow);
}

.benefits-carousel .owl-item span {
    letter-spacing: 2px;
}

.benefits-carousel .owl-item.center .bg-light {
    background: var(--bs-primary) !important;
}

.benefits-carousel .owl-item.center .bg-light * {
    color: var(--bs-dark) !important;
}

/* Benefits Carousel Navigation */
.benefits-carousel .owl-nav {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.benefits-carousel .owl-nav .owl-prev,
.benefits-carousel .owl-nav .owl-next {
    margin: 0 5px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--bs-dark);
    background: var(--bs-primary);
    transition: var(--transition-slow);
}

.benefits-carousel .owl-nav .owl-prev:hover,
.benefits-carousel .owl-nav .owl-next:hover {
    color: var(--bs-white);
    background: var(--bs-dark);
}

/* ========================================
   FOOTER SECTION
   ======================================== */

/* Footer Logo */
.footer-logo {
    width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

/* Footer Layout */
@media (min-width: 992px) {
    .site-footer::after {
        position: absolute;
        content: "";
        width: 1px;
        height: 100%;
        top: 0;
        left: 50%;
        background: var(--bs-secondary);
    }
}

/* Footer Links */
.site-footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
    text-transform: capitalize;
    transition: var(--transition-speed);
}

.site-footer .btn.btn-link:hover {
    color: var(--bs-primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.site-footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    margin-right: 10px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-content {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bs-light);
        border-top: var(--border-light);
        display: none;
    }
    
    .nav-content.show {
        display: block;
    }
}

/* Desktop Navigation */
@media (min-width: 992px) {
    .nav-content {
        display: flex !important;
    }
}