/* Font Faces */

@font-face {
    font-family: 'arb';
    src: url('../fonts/arb.ttf') format('truetype');
    font-display: swap;
}


/* CSS Variables */

:root {
    --primary-color: #DAA520;
    --text-color: blanchedalmond;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --section-spacing: 4rem;
    --section-spacing-mobile: 2rem;
}


/* Common Body Styles */

body {
    background-image: url('../img/backgroundN.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: var(--navbar-height);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
    font-family: 'arb', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif !important;
}

main {
    margin-top: var(--navbar-height);
}


/* RTL Support */

[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}


/* Responsive Typography */

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 12px;
    }
}


/* Section Spacing */

section {
    padding: var(--section-spacing) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--section-spacing-mobile) 0;
    }
}


/* Common Components */

.hero-section {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
}

.hero-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-logo {
    width: 200px;
    height: auto;
    margin: 0;
}

.hero-decorative-line {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0.5rem 0;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 40vh !important;
        padding: 1rem 0;
    }
    .hero-content {
        gap: 1rem;
    }
    .hero-logo {
        width: 120px;
    }
    .hero-decorative-line {
        max-width: 200px;
    }
    .hero-text {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    .hero-title {
        font-size: 1.8rem !important;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 40vh !important;
        padding: 0.5rem 0;
    }
    .hero-logo {
        width: 100px;
    }
    .hero-decorative-line {
        max-width: 150px;
    }
    .hero-text {
        font-size: 0.9rem;
    }
    .hero-title {
        font-size: 1.5rem !important;
    }
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 1200px) {
    .content-container {
        max-width: 100%;
        padding: 0 2rem;
    }
}


/* Buttons */

.custom-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.custom-btn:hover {
    background-color: var(--primary-color);
    color: black;
}

@media (max-width: 576px) {
    .custom-btn {
        padding: 0.5rem 1.5rem;
        min-width: 120px;
    }
}


/* Images */

img {
    max-width: 100%;
    height: auto;
}


/* Video Backgrounds */

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}


/* Overlay */

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay);
    z-index: 0;
}


/* Content Sections */

.content-section {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

@media (max-width: 768px) {
    .content-section {
        padding: 1rem;
    }
}


/* Utility Classes */

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}


/* Bootstrap Overrides */

.carousel-item {
    background-color: var(--bg-overlay);
}

.bd-placeholder-img {
    font-size: 1.125rem;
    text-anchor: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .bd-placeholder-img-lg {
        font-size: 3.5rem;
    }
}


/* Bootstrap Dark Mode Toggle */

.bd-mode-toggle {
    z-index: 1500;
}

.bd-mode-toggle .bi {
    width: 1em;
    height: 1em;
}

.bd-mode-toggle .dropdown-menu .active .bi {
    display: block !important;
}


/* Animations */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Loading States */

.loading {
    opacity: 0.7;
    pointer-events: none;
}


/* Error States */

.error-message {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}


/* Success States */

.success-message {
    color: #51cf66;
    background-color: rgba(81, 207, 102, 0.1);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}


/* Vision Hero Specific Styles */

.vision-hero {
    background-color: rgba(0, 0, 0, 0.5);
}

.vision-hero .hero-content {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.vision-hero .hero-text {
    font-size: 1.4rem;
    line-height: 1.8;
    margin: 1rem 0;
}


/* iPhone and Mobile Specific Styles */

@media screen and (max-width: 768px),
screen and (max-device-width: 768px),
screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px),
screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3),
screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) {
    .hero-section,
    .vision-hero {
        height: 40vh !important;
        min-height: 40vh !important;
        max-height: 40vh !important;
        padding: 0.5rem 0 !important;
    }
    .hero-content {
        gap: 0.5rem !important;
        padding: 0 0.5rem !important;
    }
    .vision-hero .hero-content {
        padding: 0 0.5rem !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    .vision-hero .hero-text {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin: 0.25rem 0 !important;
        max-height: 12vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .hero-logo {
        width: 80px !important;
        height: auto !important;
        margin: 0 !important;
    }
    .hero-decorative-line {
        max-width: 120px !important;
        margin: 0.2rem 0 !important;
    }
    .hero-title {
        font-size: 1.3rem !important;
        margin: 0.2rem 0 !important;
    }
    .hero-cta {
        padding: 0.3rem 1rem !important;
        font-size: 0.9rem !important;
        margin-top: 0.2rem !important;
    }
}


/* Additional iPhone 12 Specific Fixes */

@media screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) {
    .vision-hero .hero-text {
        max-height: 10vh !important;
        font-size: 0.85rem !important;
    }
    .hero-section,
    .vision-hero {
        height: 35vh !important;
        min-height: 35vh !important;
        max-height: 35vh !important;
    }
}