/* ========================================
   Oman eVisa - Custom Stylesheet
   ======================================== */

/* CSS Variables for Color Scheme */
:root {
    /* Primary Colors */
    --accent-color-1: #1B4B5A;
    --accent-color-2: #C19A6B;
    
    /* Link Colors */
    --link-color: #1B4B5A;
    --link-hover-color: #2D7A93;
    
    /* Button Colors */
    --button-bg: #1B4B5A;
    --button-text: #FFFFFF;
    
    /* Top Menu Colors */
    --top-menu-bg: #1B4B5A;
    --top-menu-text: #FFFFFF;
    
    /* Footer Colors */
    --footer-bg: #1B4B5A;
    --footer-text: #FFFFFF;
    --footer-link: #C19A6B;
    
    /* Accordion Colors */
    --accordion-bg: #FFFFFF;
    --accordion-text: #1B4B5A;
    
    /* Icon & Card Colors */
    --icon-color: #1B4B5A;
    --card-header-bg: #1B4B5A;
    --card-header-text: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #14213D;
    --text-secondary: #5A6477;
    
    /* Background Colors */
    --light-bg: #F5F5F5;
    --white-bg: #FFFFFF;
}

/* ========================================
   Typography - Rubik Font
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Rubik', sans-serif;
}

body {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white-bg);
}

/* Heading Styles */
h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h2 {
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

h3 {
    font-weight: 500;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h4 {
    font-weight: 400;
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
}

h5 {
    font-weight: 300;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    font-size: 16px;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* ========================================
   Header Styles
   ======================================== */
.top-header {
    background-color: var(--white-bg);
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    min-width: 300px;
    max-height: 120px;
    height: auto;
    width: auto;
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.contact-item i {
    color: var(--icon-color);
    font-size: 16px;
}

/* ========================================
   Top Navigation Menu
   ======================================== */
.top-menu {
    background-color: var(--top-menu-bg);
    min-height: 40px;
    max-height: 70px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-menu .navbar-nav {
    width: 100%;
    justify-content: center;
}

.top-menu .nav-link {
    color: var(--top-menu-text);
    font-size: 16px;
    font-weight: 500;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.top-menu .nav-link:hover,
.top-menu .nav-link:focus {
    color: var(--accent-color-2);
    background-color: rgba(193, 154, 107, 0.1);
}

.top-menu .navbar-toggler {
    background-color: var(--accent-color-2);
    border-color: var(--accent-color-2);
}

.top-menu .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FFFFFF' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mega Menu Dropdown */
.mega-dropdown {
    position: static !important;
}

.mega-dropdown .dropdown-menu.mega-menu {
    position: absolute !important;
    width: 1140px;
    max-width: calc(100vw - 30px);
    padding: 2rem;
    margin-top: 0;
    border: none;
    border-top: 3px solid var(--accent-color-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    left: 50%;
    transform: translateX(-50%) !important;
    background-color: var(--white-bg);
}

@media (min-width: 1200px) {
    .mega-dropdown .dropdown-menu.mega-menu {
        width: 1140px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .mega-dropdown .dropdown-menu.mega-menu {
        width: 960px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .mega-dropdown .dropdown-menu.mega-menu {
        width: 720px;
    }
}

@media (max-width: 767px) {
    .mega-dropdown .dropdown-menu.mega-menu {
        width: calc(100vw - 30px);
    }
}

.mega-menu .dropdown-header {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color-2);
}

.mega-menu .dropdown-item {
    padding: 0.5rem 0;
    color: var(--link-color);
    font-size: 15px;
    transition: all 0.3s ease;
}

.mega-menu .dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--link-hover-color);
    padding-left: 0.5rem;
}

/* Regular Dropdown */
.top-menu .dropdown-menu {
    border: none;
    border-top: 3px solid var(--accent-color-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.top-menu .dropdown-item {
    color: var(--link-color);
    padding: 0.5rem 1rem;
    font-size: 15px;
}

.top-menu .dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--link-hover-color);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 500px;
    max-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 75, 90, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white-bg);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .hero-content {
        min-width: 1000px;
    }
}

.hero-content h1 {
    color: var(--white-bg);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content .lead {
    color: var(--white-bg);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mobile Hero */
@media (max-width: 991px) {
    .hero-section {
        min-height: 500px;
        height: auto;
    }
    
    .hero-content {
        min-width: auto;
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1.125rem;
    }
}

@media (max-width: 767px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background-color: var(--link-hover-color);
    color: var(--button-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--button-bg);
    color: var(--button-text);
    border-color: var(--button-bg);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--link-hover-color);
    color: var(--button-text);
    border-color: var(--link-hover-color);
}

.btn-secondary {
    background-color: var(--accent-color-2);
    color: var(--button-text);
    border-color: var(--accent-color-2);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #a8845a;
    color: var(--button-text);
    border-color: #a8845a;
}

.btn-outline-primary {
    color: var(--button-bg);
    border-color: var(--button-bg);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--button-bg);
    color: var(--button-text);
    border-color: var(--button-bg);
}

.btn-outline-light {
    color: var(--white-bg);
    border-color: var(--white-bg);
    background-color: transparent;
}

.btn-outline-light:hover {
    background-color: var(--white-bg);
    color: var(--button-bg);
    border-color: var(--white-bg);
}

.btn-apply {
    background-color: var(--accent-color-2);
    color: var(--button-text);
    font-weight: 600;
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

.btn-apply:hover {
    background-color: #a8845a;
    color: var(--button-text);
}

/* Green Apply Button Override */
.btn.btn-apply.btn-lg.me-3.pulse-button {
    background: #58B957;
    color: #fff;
}

.btn.btn-apply.btn-lg.me-3.pulse-button:hover {
    background: #4a9e48;
    color: #fff;
}

/* Pulse Button Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(193, 154, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(193, 154, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(193, 154, 107, 0);
    }
}

.pulse-button {
    animation: pulse 2s infinite;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 4rem 0;
}

.section.bg-light {
    background-color: var(--light-bg);
}

.section-primary {
    background-color: var(--accent-color-1);
    color: var(--white-bg);
    padding: 6rem 0;
}

.section-primary h2,
.section-primary h3,
.section-primary h4 {
    color: var(--white-bg);
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumb-section {
    background-color: var(--light-bg);
    padding: 1rem 0;
}

.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--link-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--link-hover-color);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-secondary);
}

/* ========================================
   Cards
   ======================================== */
.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--card-header-bg);
    color: var(--card-header-text);
    font-weight: 600;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* ========================================
   Tiles / Grid Boxes
   ======================================== */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tile {
    background-color: var(--white-bg);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tile:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.tile-icon {
    font-size: 3em;
    color: var(--icon-color);
    margin-bottom: 1rem;
    display: block;
}

.tile h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tile p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   Accordion
   ======================================== */
.accordion {
    margin-top: 1.5rem;
}

.accordion-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    background-color: var(--accordion-bg);
    color: var(--accordion-text);
    font-weight: 600;
    font-size: 1.125rem;
    padding: 1.25rem 1.5rem;
    border: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--accent-color-1);
    color: var(--white-bg);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--accent-color-2);
}

.accordion-button::after {
    filter: brightness(0) saturate(100%);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) saturate(100%) invert(100%);
}

.accordion-body {
    background-color: var(--white-bg);
    padding: 1.5rem;
    color: var(--text-primary);
}

.accordion-body ul {
    margin-left: 1.5rem;
}

/* ========================================
   Lists
   ======================================== */
.list-numbered {
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
}

.list-numbered li {
    counter-increment: item;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
}

.list-numbered li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--accent-color-1);
    color: var(--white-bg);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

ul.list-styled {
    list-style: none;
    padding-left: 0;
}

ul.list-styled li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
}

ul.list-styled li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color-2);
    font-weight: 700;
    font-size: 1.25rem;
}

/* ========================================
   Tables
   ======================================== */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-collapse: collapse;
}

.table thead th {
    background-color: var(--accent-color-1);
    color: var(--white-bg);
    font-weight: 600;
    padding: 1rem;
    border: none;
    text-align: left;
}

.table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.table tbody tr:nth-of-type(even) {
    background-color: var(--light-bg);
}

.table tbody td {
    padding: 1rem;
}

.table-responsive {
    overflow-x: auto;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1.5rem;
    margin-top: 0px !important;
}

.footer h5 {
    color: var(--footer-text);
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
}

.footer p,
.footer ul {
    color: var(--footer-text);
    font-size: 15px;
}

.footer ul {
    list-style: none;
    padding-left: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--footer-link);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #d4b07e;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer .contact-item {
    color: var(--footer-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer .contact-item i {
    color: var(--footer-link);
    font-size: 16px;
}

/* ========================================
   Images
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Text Utilities
   ======================================== */
.text-primary {
    color: var(--accent-color-1) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ========================================
   Font Awesome Icons
   ======================================== */
.fas {
    color: #58B957 !important;
}

.fa, .far, .fal, .fab {
    color: var(--icon-color);
}

.text-white .fa,
.text-white .fas,
.section-primary .fa,
.section-primary .fas,
.footer .fa,
.footer .fas {
    color: inherit;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991px) {
    .header-contact {
        align-items: flex-start;
        margin-top: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .tiles-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .header-logo img {
        min-width: 200px;
        max-height: 80px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer .col-md-3,
    .footer .col-md-2 {
        margin-bottom: 2rem;
    }
}

/* ========================================
   Performance & Accessibility
   ======================================== */

/* Preload optimization */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--accent-color-2);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--accent-color-1);
    color: var(--white-bg);
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
}
