/* ==========================================================================
   Social Media Landing Page Styles
   Extends homepage.css with specialized components
   ========================================================================== */

/* Import base styles - this file extends homepage.css */
@import url('homepage.css');

/* Override/extend styles as needed */

/* ==========================================================================
   Hero Section - AI Avatar Comparison
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, #0ea5e9 0%, #0c4a6e 100%);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-12);
    align-items: center;
}

.hero-content {
    text-align: left;
}

/* RTL support for Arabic */
body[dir='rtl'] .hero-content {
    text-align: right;
}

body[dir='rtl'] .hero-title,
body[dir='rtl'] .hero-subtitle {
    text-align: right;
    direction: rtl;
}

body[dir='rtl'] .section-header {
    text-align: center;
    direction: rtl;
}

body[dir='rtl'] .section-header h2,
body[dir='rtl'] .section-header p {
    direction: rtl;
}

body[dir='rtl'] .vote-radio-label {
    flex-direction: row-reverse;
    text-align: right;
}

body[dir='rtl'] .service-card {
    text-align: right;
    direction: rtl;
}

body[dir='rtl'] .service-card h3,
body[dir='rtl'] .service-card ul {
    text-align: right;
    direction: rtl;
}

.hero-video-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-4);
    color: white;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: var(--spacing-12);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* AI Avatar Comparison in Hero */
.avatar-comparison-hero {
    margin: var(--spacing-12) 0;
    display: flex;
    justify-content: center;
}

.video-container-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-8);
    max-width: 800px;
    width: 100%;
}

.video-wrapper-hero {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-wrapper-hero h3 {
    color: white;
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-4);
}

.video-wrapper-hero video {
    width: 100%;
    max-width: 200px;
    height: 356px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    aspect-ratio: 9/16;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-4);
    justify-content: flex-start;
    margin-top: var(--spacing-12);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-4) var(--spacing-8);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
    line-height: 1;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   Voting Section
   ========================================================================== */

.voting-section {
    padding: var(--spacing-20) 0;
    background: var(--bg-secondary);
}

.voting-section .section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.voting-section .section-header h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.voting-section .section-header p {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
}

.voting-interface {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

.voting-form {
    background: white;
    padding: var(--spacing-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid #f3f4f6;
}

.voting-options {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-8);
    align-items: center;
    margin-bottom: var(--spacing-8);
}

.vote-option-wrapper {
    position: relative;
}

/* Enhanced Video Voting Interface */
.vote-video-container {
    text-align: center;
}

.video-wrapper-voting {
    background: #f8fafc;
    border-radius: var(--radius-xl);
    padding: var(--spacing-6);
    margin-bottom: var(--spacing-4);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.video-wrapper-voting:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.15);
    transform: translateY(-2px);
}

.video-wrapper-voting h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.video-wrapper-voting video {
    width: 100%;
    max-width: 187px;
    height: 335px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: #000;
    aspect-ratio: 9/16;
}

/* Custom Radio Button Styling */
.vote-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
}

.vote-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.vote-radio-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    user-select: none;
}

.vote-radio-label:hover {
    background: rgba(14, 165, 233, 0.05);
}

.radio-button {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

/* Checked state */
.vote-radio:checked + .vote-radio-label .radio-button {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
}

.vote-radio:checked + .vote-radio-label .radio-button::after {
    transform: translate(-50%, -50%) scale(1);
}

.vote-radio:checked + .vote-radio-label {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Focus states for accessibility */
.vote-radio:focus + .vote-radio-label .radio-button {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.vote-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.vote-option-label {
    display: block;
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: var(--radius-2xl);
    padding: var(--spacing-6);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.vote-option-label:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.vote-radio:checked + .vote-option-label {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    box-shadow: var(--shadow-xl);
}

.vote-submit-section {
    text-align: center;
    padding-top: var(--spacing-6);
    border-top: 1px solid #f3f4f6;
}

.vote-submit-btn {
    min-width: 200px;
    padding: var(--spacing-4) var(--spacing-8);
}

.vote-option h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
}

.vote-option p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    box-shadow: var(--shadow-lg);
}

/* Voting Results */
.voting-results {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-8);
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.results-header h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
}

.user-result {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-8);
    padding: var(--spacing-4);
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.user-result.correct {
    background: #dcfce7;
    color: #166534;
}

.user-result.incorrect {
    background: #fef2f2;
    color: #dc2626;
}

.results-chart {
    margin: var(--spacing-8) 0;
}

.result-bar {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    gap: var(--spacing-4);
    align-items: center;
    margin-bottom: var(--spacing-4);
}

.bar-label {
    font-weight: 600;
    color: var(--text-primary);
}

.bar-container {
    height: 40px;
    background: #f3f4f6;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    transition: width 1s ease;
    width: 0%;
}

.percentage {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.results-reveal {
    margin: var(--spacing-8) 0;
    padding: var(--spacing-6);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--secondary-color);
}

.reveal-answer h4 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
}

.reveal-answer p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.6;
}

.total-votes {
    margin-top: var(--spacing-6);
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

.total-votes strong {
    color: var(--primary-color);
    font-size: var(--font-size-xl);
}

.cta-after-vote {
    margin-top: var(--spacing-8);
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services {
    padding: var(--spacing-20) 0;
    background: white;
}

.services .section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.services .section-header h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.services .section-header p {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-6);
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-4);
    box-shadow: var(--shadow-sm);
}

.service-icon i {
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-3);
    line-height: 1.3;
}

.service-features {
    padding: 0;
    margin-bottom: 0;
}

.service-features li {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    position: relative;
    padding-left: var(--spacing-5);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: var(--spacing-1);
    color: var(--success-color);
    font-weight: 700;
    font-size: var(--font-size-sm);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact {
    padding: var(--spacing-20) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.contact .section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.contact .section-header h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-4);
}

.contact .section-header p {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.social-media-form {
    background: white;
    padding: var(--spacing-10);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

.form-group {
    margin-bottom: var(--spacing-6);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-2);
    font-size: var(--font-size-base);
}

.form-group input {
    width: 100%;
    padding: var(--spacing-4);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group small {
    display: block;
    margin-top: var(--spacing-1);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.submit-btn {
    width: 100%;
    padding: var(--spacing-5) var(--spacing-8);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-6);
}

.contact-info-inline {
    text-align: center;
    padding-top: var(--spacing-6);
    border-top: 1px solid #f3f4f6;
}

.response-info {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
}

.response-info i {
    color: var(--success-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    /* Mobile RTL adjustments */
    body[dir='rtl'] .hero-content {
        text-align: center;
    }
    
    .video-container-hero {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }
    
    /* Responsive voting interface */
    .voting-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }
    
    .vs-divider {
        order: 2;
        margin: var(--spacing-4) auto;
    }
    
    .vote-option-wrapper:first-child {
        order: 1;
    }
    
    .vote-option-wrapper:last-child {
        order: 3;
    }
    
    .video-wrapper-voting video {
        max-width: 151px;
        height: 268px;
        object-fit: cover;
        aspect-ratio: 9/16;
    }
    
    .video-wrapper-voting {
        padding: var(--spacing-4);
    }
    
    .video-wrapper-hero video {
        max-width: 180px;
        height: 320px;
        aspect-ratio: 9/16;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .voting-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .vs-divider {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
        margin: var(--spacing-4) auto;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }
    
    .result-bar {
        grid-template-columns: 80px 1fr 50px;
        gap: var(--spacing-2);
    }
    
    .social-media-form {
        padding: var(--spacing-8);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 80px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .video-wrapper-hero {
        padding: var(--spacing-4);
    }
    
    .video-wrapper-hero video {
        max-width: 160px;
        height: 285px;
        aspect-ratio: 9/16;
    }
    
    .vote-btn {
        padding: var(--spacing-6);
    }
    
    .vote-option h3 {
        font-size: var(--font-size-xl);
    }
    
    .service-card {
        padding: var(--spacing-6);
    }
    
    .social-media-form {
        padding: var(--spacing-6);
    }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Focus indicators */
.vote-btn:focus,
.btn:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .vote-btn {
        border-width: 2px;
        border-color: var(--text-primary);
    }
    
    .service-card {
        border-width: 2px;
        border-color: var(--text-primary);
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}