/**
 * Trancecontinental Theme Custom Styles
 */

/* Base Reset & Typography */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Arabic Typography */
html[dir="rtl"],
body[dir="rtl"] {
    font-family: 'Cairo', 'Noto Kufi Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

/* English Typography */
html[dir="ltr"],
body[dir="ltr"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Container Improvements */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Custom Button Styles */
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    outline: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Card Hover Effects */
.event-card,
.service-card,
.sector-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.75rem;
    overflow: hidden;
}

.event-card:hover,
.service-card:hover,
.sector-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Section Spacing */
section {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Footer Improvements */
.site-footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

.site-footer h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.site-footer a {
    transition: color 0.3s ease;
    text-decoration: none;
}

.site-footer a:hover {
    color: #60a5fa;
}

/* RTL-aware icon spacing */
.footer-icon,
.contact-icon {
    flex-shrink: 0;
}

[dir="rtl"] .footer-icon,
[dir="rtl"] .contact-icon {
    margin-left: 0.75rem;
    margin-right: 0;
}

[dir="ltr"] .footer-icon,
[dir="ltr"] .contact-icon {
    margin-right: 0.75rem;
    margin-left: 0;
}

/* Navigation Menu Spacing */
.main-nav-menu,
.fallback-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

[dir="rtl"] .main-nav-menu,
[dir="rtl"] .fallback-menu {
    flex-direction: row-reverse;
}

/* Header Actions Spacing */
.header-actions {
    gap: 1rem;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #1f2937;
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: #2563eb;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none !important;
    }
}

/* Mobile Menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu:not(.hidden) {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    margin: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #2563eb;
}

/* Language switcher removed - using GTranslate plugin */

/* Contact Form Success/Error Messages */
.contact-form-wrapper .success-message,
.contact-form-wrapper .error-message {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

.contact-form-wrapper .success-message {
    background-color: #10b981;
    color: white;
    border-left: 4px solid #059669;
}

[dir="rtl"] .contact-form-wrapper .success-message {
    border-left: none;
    border-right: 4px solid #059669;
}

.contact-form-wrapper .error-message {
    background-color: #ef4444;
    color: white;
    border-left: 4px solid #dc2626;
}

[dir="rtl"] .contact-form-wrapper .error-message {
    border-left: none;
    border-right: 4px solid #dc2626;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Improvements */
.contact-form-wrapper input,
.contact-form-wrapper textarea,
.contact-form-wrapper select {
    transition: all 0.3s ease;
    font-size: 1rem;
}

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus,
.contact-form-wrapper select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.contact-form-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.contact-form-wrapper .text-red-500 {
    color: #ef4444;
    font-weight: 600;
}

/* Sticky Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Navigation Menu */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

[dir="rtl"] .main-navigation ul {
    flex-direction: row-reverse;
}

.main-navigation a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.main-navigation a:hover {
    color: #2563eb;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

[dir="rtl"] .main-navigation a::after {
    left: auto;
    right: 0;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
}

.site-branding img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.site-title {
    color: #1f2937;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: #2563eb;
}

/* Animation for scroll hint */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #111827;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}

/* Link Styles */
a {
    color: #2563eb;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Grid Improvements */
.grid {
    display: grid;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid {
        gap: 1.5rem;
    }
}

/* Contact Info Cards */
.contact-info .bg-white {
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.contact-info .bg-white:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Service/Event Cards */
.service-card,
.event-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2563eb;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .btn-primary,
    .btn-secondary,
    .mobile-menu-toggle,
    .language-switcher {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
