/**
 * Custom stylesheet for Owners Associations (اتحادات الملاك)
 * RTL-optimized, highly interactive, and premium visual design.
 */

:root {
    --oa-bg-dark: #130a24;
    --oa-bg-dark-card: rgba(23, 14, 43, 0.95);
    --oa-primary: #8566B1;
    --oa-primary-hover: #7252a1;
    --oa-primary-glow: rgba(133, 102, 177, 0.15);
    --oa-primary-light: rgba(133, 102, 177, 0.08);
    --oa-gold: #D9A05B;
    --oa-gold-light: rgba(217, 160, 91, 0.1);
    --oa-sand: #B6ADA5;
    --oa-dark: #2D2D2D;
    --oa-border: rgba(133, 102, 177, 0.12);
    --oa-radius: 16px;
    --oa-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ---------------------------------------------------------
   Section 1: Split Screen Hero
   --------------------------------------------------------- */
.oa-page .hero {
    background: radial-gradient(circle at 80% 20%, rgba(133, 102, 177, 0.12), transparent 45%),
                linear-gradient(135deg, var(--oa-bg-dark) 0%, #1f1435 100%);
    color: #ffffff;
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.oa-page .hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #faf9fb, transparent);
    z-index: 2;
}

.oa-page .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.oa-page .hero-copy .eyebrow {
    color: var(--oa-gold);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(217, 160, 91, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
}

.oa-page .hero-copy h1 {
    font-size: clamp(32px, 3.5vw, 48px);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #ffffff;
}

.oa-page .hero-copy .lead {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 35px;
    line-height: 1.8;
}

.oa-page .hero-actions {
    display: flex;
    gap: 15px;
}

/* Framework Infographic Card Styling */
.oa-page .kashaf-live-governance-panel {
    background: var(--oa-bg-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                0 0 40px rgba(133, 102, 177, 0.1);
    backdrop-filter: blur(12px);
    position: relative;
}

.oa-page .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.oa-page .panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oa-page .panel-badge {
    background: var(--oa-gold-light);
    color: var(--oa-gold);
    border: 1px solid rgba(217, 160, 91, 0.2);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
}

.oa-page .framework-pillars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oa-page .framework-pillar-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 12px 16px;
    transition: var(--oa-transition);
    text-align: right;
}

.oa-page .framework-pillar-item:hover {
    background: rgba(133, 102, 177, 0.05);
    border-color: rgba(133, 102, 177, 0.2);
    transform: translateY(-2px);
}

.oa-page .framework-pillar-item .pillar-icon {
    width: 36px;
    height: 36px;
    background: rgba(217, 160, 91, 0.1);
    color: var(--oa-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.oa-page .framework-pillar-item h4 {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 3px;
}

.oa-page .framework-pillar-item p {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
    margin: 0;
}

/* ---------------------------------------------------------
   Section 2: Interactive Governance Tabs (Circle alternative)
   --------------------------------------------------------- */
.oa-page .gov-interactive-section {
    background-color: #faf9fb;
}

.oa-page .gov-tabs-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    margin-top: 50px;
    background: #ffffff;
    border: 1px solid var(--oa-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(45, 45, 45, 0.04);
}

.oa-page .gov-tabs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oa-page .gov-tab-btn {
    background: #ffffff;
    border: 1px solid rgba(133, 102, 177, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    text-align: right;
    cursor: pointer;
    transition: var(--oa-transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
}

.oa-page .gov-tab-btn:hover {
    border-color: var(--oa-primary);
    background: rgba(133, 102, 177, 0.02);
}

.oa-page .gov-tab-btn.active {
    background: var(--oa-primary);
    border-color: var(--oa-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(133, 102, 177, 0.25);
}

.oa-page .gov-tab-btn-title {
    font-size: 16px;
    font-weight: 700;
}

.oa-page .gov-tab-btn-num {
    font-size: 14px;
    font-weight: 800;
    opacity: 0.5;
}

.oa-page .gov-tab-btn.active .gov-tab-btn-num {
    opacity: 0.9;
    color: var(--oa-gold);
}

/* Panel Details Content */
.oa-page .gov-panel-display {
    background: #faf9fb;
    border-radius: 18px;
    padding: 35px;
    border: 1px solid var(--oa-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 380px;
    position: relative;
    overflow: hidden;
}

.oa-page .gov-panel-content {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.35s ease;
    display: none;
}

.oa-page .gov-panel-content.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.oa-page .gov-panel-badge {
    background: var(--oa-primary-light);
    color: var(--oa-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 15px;
}

.oa-page .gov-panel-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--oa-dark);
    margin-bottom: 15px;
}

.oa-page .gov-panel-content p {
    font-size: 15.5px;
    color: rgba(45, 45, 45, 0.7);
    line-height: 1.8;
    margin-bottom: 25px;
}

.oa-page .gov-panel-features {
    margin: 0;
    padding: 0;
    list-style: none;
}

.oa-page .gov-panel-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--oa-dark);
    margin-bottom: 10px;
}

.oa-page .gov-panel-features li::before {
    content: "✓";
    color: var(--oa-gold);
    font-weight: bold;
    font-size: 16px;
}

/* Mobile Accordion (Hidden by default, shown on mobile) */
.oa-page .gov-accordion-list {
    display: none;
    margin-top: 30px;
}

.oa-page .gov-accordion-item {
    background: #ffffff;
    border: 1px solid var(--oa-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--oa-transition);
}

.oa-page .gov-accordion-header {
    padding: 18px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--oa-dark);
}

.oa-page .gov-accordion-header::after {
    content: "+";
    font-size: 18px;
    color: var(--oa-primary);
}

.oa-page .gov-accordion-item.active {
    border-color: var(--oa-primary);
    box-shadow: 0 4px 15px rgba(133, 102, 177, 0.08);
}

.oa-page .gov-accordion-item.active .gov-accordion-header {
    background: var(--oa-primary-light);
    color: var(--oa-primary);
}

.oa-page .gov-accordion-item.active .gov-accordion-header::after {
    content: "−";
}

.oa-page .gov-accordion-content {
    display: none;
    padding: 20px;
    border-top: 1px solid rgba(133, 102, 177, 0.05);
    background: #ffffff;
}

.oa-page .gov-accordion-content p {
    font-size: 14px;
    color: rgba(45, 45, 45, 0.75);
    line-height: 1.7;
    margin-bottom: 15px;
}

/* ---------------------------------------------------------
   Section 3: Interactive Compare Switcher
   --------------------------------------------------------- */
.oa-page .compare-toggle-bar {
    display: flex;
    justify-content: center;
    margin: 40px auto 50px;
    background: rgba(133, 102, 177, 0.06);
    border-radius: 50px;
    padding: 6px;
    width: fit-content;
    border: 1px solid var(--oa-border);
}

.oa-page .compare-toggle-btn {
    background: transparent;
    border: none;
    padding: 10px 28px;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--oa-transition);
    color: var(--oa-primary);
    font-family: inherit;
}

.oa-page .compare-toggle-btn.active {
    background: var(--oa-primary);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(133, 102, 177, 0.2);
}

.oa-page .compare-switcher-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    transition: var(--oa-transition);
}

/* Individual comparative cards */
.oa-page .compare-item-card {
    background: #ffffff;
    border: 1px solid var(--oa-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--kashaf-shadow-soft);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 20px;
    transition: var(--oa-transition);
}

.oa-page .compare-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    transition: var(--oa-transition);
}

.oa-page .compare-card-details h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--oa-dark);
}

.oa-page .compare-card-details p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* Traditional State */
.oa-page .compare-switcher-cards.state-traditional .compare-item-card {
    border-color: rgba(220, 38, 38, 0.12);
    background: #fdfcfc;
}

.oa-page .compare-switcher-cards.state-traditional .compare-icon-wrap {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

.oa-page .compare-switcher-cards.state-traditional .compare-card-details p {
    color: rgba(220, 38, 38, 0.7);
}

/* Kashaf State */
.oa-page .compare-switcher-cards.state-kashaf .compare-item-card {
    border-color: rgba(16, 185, 129, 0.18);
    background: #fcfdfc;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.03);
}

.oa-page .compare-switcher-cards.state-kashaf .compare-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(133, 102, 177, 0.1);
    border-color: var(--oa-primary);
}

.oa-page .compare-switcher-cards.state-kashaf .compare-icon-wrap {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

.oa-page .compare-switcher-cards.state-kashaf .compare-card-details p {
    color: rgba(45, 45, 45, 0.7);
}

/* ---------------------------------------------------------
   Section 4: Glassmorphic Packages
   --------------------------------------------------------- */
.oa-page .packages-section {
    background: linear-gradient(180deg, #faf9fb 0%, #ffffff 100%);
    padding: 100px 0;
}

.oa-page .packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.oa-page .package-card {
    background: #ffffff;
    border: 1px solid rgba(133, 102, 177, 0.08);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(45, 45, 45, 0.02);
    transition: var(--oa-transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.oa-page .package-card:hover {
    transform: translateY(-8px);
    border-color: var(--oa-primary);
    box-shadow: 0 20px 40px rgba(133, 102, 177, 0.12);
}

.oa-page .package-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--oa-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(133, 102, 177, 0.06);
}

.oa-page .package-features {
    margin: 0 0 35px;
    padding: 0;
    list-style: none;
    flex-grow: 1;
}

.oa-page .package-features li {
    font-size: 13.5px;
    color: rgba(45, 45, 45, 0.75);
    margin-bottom: 12px;
    padding-right: 28px; /* Safety margin for checkmark on the right */
    padding-left: 0;
    position: relative; /* Base for absolute positioning */
    line-height: 1.5;
}

.oa-page .package-features li::before {
    content: "✓";
    color: var(--oa-primary);
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 10px; /* Align vertically with text */
    margin: 0;
    font-size: 14px;
}

.oa-page .package-card .btn {
    width: 100%;
    text-align: center;
}

/* Highlighted Popular Package */
.oa-page .package-card.popular {
    border-color: var(--oa-gold);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(217, 160, 91, 0.08);
}

.oa-page .package-card.popular:hover {
    box-shadow: 0 30px 50px rgba(217, 160, 91, 0.15);
}

.oa-page .package-badge {
    position: absolute;
    top: -14px;
    right: 25px;
    background: var(--oa-gold);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(217, 160, 91, 0.3);
}

.oa-page .package-card.popular h3 {
    color: var(--oa-gold);
}

.oa-page .package-card.popular .package-features li::before {
    color: var(--oa-gold);
}

.oa-page .package-card.popular .btn {
    background: var(--oa-gold);
    color: #ffffff;
    border-color: var(--oa-gold);
}

.oa-page .package-card.popular .btn:hover {
    background: var(--oa-dark);
    border-color: var(--oa-dark);
}

/* Package header block */
.oa-page .pkg-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(133, 102, 177, 0.06);
    text-align: center;
}

.oa-page .package-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--oa-dark);
    margin-bottom: 6px;
    padding-bottom: 0;
    border-bottom: none;
}

.oa-page .pkg-desc {
    font-size: 13px;
    color: rgba(45, 45, 45, 0.6);
    margin: 0 0 10px;
    line-height: 1.5;
}

.oa-page .pkg-rate-tag {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--oa-primary);
    background: rgba(133, 102, 177, 0.07);
    border-radius: 99px;
    padding: 4px 12px;
}

.oa-page .pkg-rate-tag strong {
    font-weight: 900;
}

/* Estimator Controls */
.oa-page .pkg-estimator-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.oa-page .pkg-estimator-field {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.oa-page .pkg-estimator-field label {
    font-size: 11.5px;
    font-weight: 700;
    color: rgba(45, 45, 45, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.oa-page .pkg-units-input,
.oa-page .pkg-cycle-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(133, 102, 177, 0.15);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--oa-dark);
    background: #fafaff;
    outline: none;
    transition: border-color 0.2s ease;
    direction: rtl;
}

.oa-page .pkg-units-input:focus,
.oa-page .pkg-cycle-select:focus {
    border-color: var(--oa-primary);
}

/* Estimate Result Display */
.oa-page .pkg-estimate-result {
    background: rgba(133, 102, 177, 0.04);
    border: 1px solid rgba(133, 102, 177, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oa-page .pkg-total-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(45, 45, 45, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.oa-page .pkg-total-amount {
    font-size: 22px;
    font-weight: 900;
    color: var(--oa-dark);
    direction: ltr;
    text-align: right;
}

.oa-page .pkg-savings-label {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    min-height: 16px;
}

.oa-page .pkg-savings-label[data-active="yes"] {
    display: block;
}

.oa-page .package-card.popular .pkg-savings-label {
    color: var(--oa-gold);
}

/* ---------------------------------------------------------
   Special-Request CTA Band (Phase 3)
   --------------------------------------------------------- */
.oa-special-request-band {
    background: linear-gradient(135deg, #130a24 0%, #1e0f38 100%);
    padding: 36px 0;
}

.oa-special-request-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.oa-special-request-copy p {
    font-size: 16.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    line-height: 1.6;
}

.oa-special-request-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .oa-special-request-inner {
        flex-direction: column;
        text-align: center;
    }
    .oa-special-request-btn {
        width: 100%;
        text-align: center;
    }
}

/* ---------------------------------------------------------
   Responsive Media Queries
   --------------------------------------------------------- */
@media (max-width: 991px) {
    .oa-page .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .oa-page .hero-actions {
        justify-content: center;
    }
    
    .oa-page .gov-tabs-container {
        display: none; /* Hide tab interface on mobile */
    }
    
    .oa-page .gov-accordion-list {
        display: block; /* Show accordion interface on mobile */
    }
    
    .oa-page .compare-switcher-cards {
        grid-template-columns: 1fr;
    }
    
    .oa-page .packages-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 40px auto 0;
    }
    
    .oa-page .package-card {
        padding: 30px 24px;
    }
}

@media (max-width: 575px) {
    .oa-page .hero-actions {
        flex-direction: column;
    }
    
    .oa-page .hero-actions .btn {
        width: 100%;
    }
    
    .oa-page .compare-toggle-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    .oa-page .compare-item-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
