/* ===== BASE STYLES ===== */
.iw-header {
    background-color: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    width: 100%;
    top: 0;
    z-index: 1000;
    font-family: 'Philosopher', sans-serif;
    padding: 0 20px;
}

.iw-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 0;
    position: relative;
}

/* Logo */
.iw-logo {
    height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

.iw-logo:hover {
    transform: scale(1.03);
}

/* Navigation */
.iw-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.iw-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.iw-nav-item {
    position: relative;
}

.iw-nav-link {
    color: #234e52;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    padding: 8px 5px;
    position: relative;
    transition: all 0.3s;
    display: block;
}

.iw-nav-link:hover {
    color: #7f1102;
}

/* Submenu Styling */
.iw-submenu {
    position: absolute;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    min-width: 220px;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    padding: 10px 0;
    list-style: none;
    margin-top: 10px;
}

.iw-has-submenu:hover .iw-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.iw-submenu-link {
    display: block;
    padding: 12px 25px;
    color: #234e52;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.iw-submenu-link:hover {
    background-color: #f8f8f8;
    color: #7f1102;
    padding-left: 30px;
}

/* Counselling Button */
.iw-counselling-btn {
    background: linear-gradient(135deg, #234e52 0%, #1a3b3e 100%);
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 50px;
    animation: pulse 2s infinite;
    box-shadow: 0 5px 20px rgba(35, 78, 82, 0.25);
    transition: all 0.3s;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.iw-counselling-btn:hover {
    background: linear-gradient(135deg, #1a3b3e 0%, #234e52 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(35, 78, 82, 0.35);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(35, 78, 82, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(35, 78, 82, 0); }
    100% { box-shadow: 0 0 0 0 rgba(35, 78, 82, 0); }
}

/* Auth Buttons */
.iw-auth-buttons {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

.iw-login-btn,
.iw-register-btn {
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.iw-login-btn {
    border: 2px solid #234e52;
    color: #234e52;
}

.iw-register-btn {
    background: #7f1102;
    color: white;
}

.iw-login-btn:hover {
    background: #234e52;
    color: white;
    transform: translateY(-2px);
}

.iw-register-btn:hover {
    background: #6a0e02;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 17, 2, 0.25);
}

/* Mobile Navigation */
.iw-mobile-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1100;
}

.iw-toggle-bar {
    width: 30px;
    height: 3px;
    background: #234e52;
    margin: 3px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    border-radius: 2px;
}

.iw-mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.5s ease;
    overflow-y: auto;
    padding: 80px 20px 30px;
}

.iw-mobile-nav.active {
    right: 0;
}

.iw-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.iw-mobile-nav-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.iw-mobile-nav-link {
    display: block;
    color: #234e52;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 10px;
    transition: all 0.3s;
}

.iw-mobile-nav-link:hover {
    color: #7f1102;
    padding-left: 15px;
}

.iw-mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 20px;
    display: none;
}

.iw-mobile-submenu-link {
    display: block;
    padding: 10px 15px;
    color: #234e52;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
}

.iw-mobile-submenu-link:hover {
    color: #7f1102;
    background: #f8f8f8;
    border-radius: 5px;
}

.iw-auth-mobile {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border: none;
    padding: 0;
}

.iw-auth-mobile .iw-login-btn,
.iw-auth-mobile .iw-register-btn {
    flex: 1;
    text-align: center;
    padding: 12px 0;
}

/* Active States */
.iw-mobile-nav-item.active .iw-mobile-submenu {
    display: block;
}

/* Overlay */
.iw-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.iw-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Arabic Font */
.iw-arabic {
    font-family: 'Amiri', serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .iw-nav,
    .iw-auth-buttons {
        display: none;
    }
    
    .iw-mobile-toggle {
        display: flex;
    }
    
    .iw-header-container {
        padding: 10px 0;
    }
}

/* === IW header spacing helpers === */
:root {
  --iw-header-height: 88px; /* fallback — JS will set exact value */
}

/* Ensure main content starts below header (covers most WP themes) */
body > main,
body .site-content,
body .site-main,
body #primary,
body .content-wrapper,
.wrap,
.container,
#content {
  padding-top: var(--iw-header-height) !important;
}

/* Make fragment / anchor scrolling respect header height */
html {
  scroll-padding-top: calc(var(--iw-header-height) + 12px);
}
[id] {
  scroll-margin-top: calc(var(--iw-header-height) + 12px);
}
