/**
 * Kairo Website - Responsive Multilingual Design
 * Based on Bauhaus Design Style with Kairo Brand Identity
 * Colors: Primary (Light Orange, Salmon, Yellow, Black) + Secondary palette
 * Font: IRANYekanXFaNum for Persian, system fonts for English/Arabic
 */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --light-orange: #EAD7B6;
    --salmon: #FF751F;
    --red: #DD553A;
    --yellow: #FFD527;
    --black: #000000;
    
    /* Secondary Colors */
    --light-gray: #D9D9D9;
    --gray-blue: #762C73;
    --indigo: #DD553A;
    --blue: #6da5c6;
    --gray-green: #447e4a;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background: linear-gradient(135deg, #ffffff 0%, var(--light-orange) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* RTL Support for Farsi and Arabic */
[dir="rtl"] {
    font-family: 'IRANYekanXFaNum', Tahoma, Arial, sans-serif;
    font-weight: normal;
}

[dir="ltr"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Apply IRANYekan font to all Farsi content */
[dir="rtl"] .description,
[dir="rtl"] .cta-button {
    font-family: 'IRANYekanXFaNum', Tahoma, Arial, sans-serif;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

/* Circular Flag Button */
.lang-selector-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--salmon);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.lang-selector-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--yellow);
}

.lang-selector-btn:active {
    transform: scale(0.95);
}

.flag-icon {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Dropdown Menu */
.lang-dropdown {
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 0.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language Options */
.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
}

.lang-option .flag-icon {
    width: 35px;
    height: 35px;
}

.lang-code {
    display: none;
}

.lang-option:hover {
    background: var(--light-orange);
    transform: scale(1.1);
}

.lang-option.active {
    background: linear-gradient(135deg, var(--salmon), var(--red));
    border-color: var(--salmon);
}

.lang-option:focus {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

/* ===== BAUHAUS DECORATIVE BACKGROUND ===== */
.bauhaus-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--salmon);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--yellow);
    border-radius: 0;
    transform: rotate(45deg);
    bottom: 10%;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 125px;
    background: var(--blue);
    border-radius: 125px 125px 0 0;
    top: 60%;
    left: 10%;
    animation-delay: 10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: var(--gray-green);
    border-radius: 50%;
    top: 20%;
    right: 15%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
    75% { transform: translate(40px, 10px) rotate(270deg); }
}

/* ===== MAIN CONTAINER ===== */
.container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== LOGO ===== */
.logo-container {
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.logo {
    width: 150px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
    display: block;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CONTENT ===== */
.content {
    max-width: 900px;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.3s both;
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-content {
    display: block;
}

.lang-content.hidden {
    display: none;
}

/* ===== TYPOGRAPHY ===== */
.headline {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 2rem;
    color: var(--black);
    position: relative;
}

/* Farsi H1 - Bold Font */
[dir="rtl"] .headline {
    font-family: 'IRANYekanXFaNum', Tahoma, Arial, sans-serif;
    font-weight: bold;
}

.headline::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--salmon), var(--yellow));
    margin: 1.5rem auto;
    border-radius: 2px;
}

.subtext {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: normal;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Farsi H2 - Regular Font */
[dir="rtl"] .subtext {
    font-family: 'IRANYekanXFaNum', Tahoma, Arial, sans-serif;
    font-weight: normal;
}

.description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: #555;
    margin-top: 2rem;
    font-weight: 500;
}

/* ===== CALL TO ACTION SECTION ===== */
.cta-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--salmon), var(--red));
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(255, 117, 31, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--yellow), var(--salmon));
    transition: left 0.4s ease;
    z-index: -1;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 117, 31, 0.4);
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 117, 31, 0.3);
}

.cta-button:focus {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.un-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.un-logo:hover {
    transform: scale(1.05);
}

/* ===== SOCIAL MEDIA LINKS ===== */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: var(--light-orange);
}

.social-icon:active {
    transform: translateY(-2px) scale(1.05);
}

/* ===== DECORATIVE CIRCLE ACCENT ===== */
.circle-accent {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--salmon), var(--yellow));
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 3rem 1.5rem;
    }
    
    .content {
        padding: 2.5rem;
    }
    
    .logo {
        width: 120px;
        height: auto;
    }
    
    .shape-1, .shape-2, .shape-3, .shape-4 {
        opacity: 0.1;
    }
}

/* Mobile Landscape & Small Tablet (481px - 767px) */
@media screen and (max-width: 767px) {
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }
    
    .lang-selector-btn {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }
    
    .flag-icon {
        width: 30px;
        height: 30px;
    }
    
    .lang-dropdown {
        top: 60px;
        padding: 0.4rem;
    }
    
    .lang-option {
        width: 45px;
        height: 45px;
        padding: 0.4rem;
    }
    
    .lang-option .flag-icon {
        width: 30px;
        height: 30px;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }
    
    .logo {
        width: 100px;
        height: auto;
    }
    
    .logo-container {
        margin-bottom: 2rem;
    }
    
    .headline::after {
        width: 60px;
        height: 3px;
        margin: 1rem auto;
    }
    
    .cta-container {
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .cta-button {
        padding: 0.9rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .un-logo {
        height: 50px;
    }
    
    .social-links {
        gap: 1.2rem;
        margin-top: 1.5rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        padding: 8px;
    }
    
    .circle-accent {
        width: 100px;
        height: 100px;
        bottom: -30px;
        right: -30px;
    }
    
    .shape-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-2 {
        width: 150px;
        height: 150px;
    }
}

/* Mobile Portrait (320px - 480px) */
@media screen and (max-width: 480px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }
    
    .language-switcher {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .lang-selector-btn {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }
    
    .flag-icon {
        width: 26px;
        height: 26px;
    }
    
    .lang-dropdown {
        top: 55px;
        padding: 0.3rem;
    }
    
    .lang-option {
        width: 40px;
        height: 40px;
        padding: 0.3rem;
    }
    
    .lang-option .flag-icon {
        width: 26px;
        height: 26px;
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
    
    .content {
        padding: 1.5rem 1.2rem;
        border-radius: 12px;
    }
    
    .logo {
        width: 80px;
        height: auto;
    }
    
    .logo-container {
        margin-bottom: 1.5rem;
    }
    
    .headline {
        margin-bottom: 1.5rem;
    }
    
    .headline::after {
        width: 50px;
        margin: 1rem auto;
    }
    
    .subtext {
        margin-bottom: 1rem;
    }
    
    .description {
        margin-top: 1.5rem;
    }
    
    .cta-container {
        gap: 1rem;
        flex-direction: column;
    }
    
    .un-logo {
        height: 45px;
    }
    
    .social-links {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        padding: 7px;
    }
    
    .circle-accent {
        width: 80px;
        height: 80px;
        bottom: -20px;
        right: -20px;
    }
    
    .shape-1, .shape-2, .shape-3, .shape-4 {
        opacity: 0.08;
    }
}

/* Large Desktop (1440px+) */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
        padding: 5rem 3rem;
    }
    
    .content {
        padding: 4rem;
    }
    
    .logo {
        width: 180px;
        height: auto;
    }
}

/* Print Styles */
@media print {
    .language-switcher,
    .bauhaus-bg,
    .circle-accent {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .content {
        box-shadow: none;
        background: white;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .content {
        border: 2px solid var(--black);
    }
    
    .lang-option {
        border: 2px solid var(--black);
    }
}
