/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Veterinary Color Palette */
    --primary-green: #0a7e3e;
    --primary-green-dark: #065a2c;
    --primary-green-light: #0e9f4f;
    --secondary-green: #4CAF50;
    --accent-teal: #20b2aa;
    --accent-amber: #ffa726;
    
    /* Neutral Colors */
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b6b6b;
    --bg-light: #f5f8f6;
    --bg-white: #ffffff;
    --border-light: #e0e6e3;
    
    /* Semantic Colors */
    --success: #2e7d32;
    --info: #0288d1;
    --warning: #f57c00;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(10, 126, 62, 0.08);
    --shadow-md: 0 4px 16px rgba(10, 126, 62, 0.12);
    --shadow-lg: 0 8px 32px rgba(10, 126, 62, 0.16);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    direction: ltr;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body[dir="rtl"] {
    font-family: 'Cairo', 'Poppins', sans-serif;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Language Switcher - Elevated Design */
.language-switcher {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    margin: 0 6px;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.lang-btn.active {
    background: var(--bg-white);
    color: var(--primary-green);
    border-color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Header - Fixed Height Structure */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    height: 90px; /* Fixed header height */
    display: flex;
    align-items: center;
}

.header .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 32px;
}

/* Logo Container - Fixed Height */
.logo-container {
    display: flex;
    align-items: center;
    height: 70px; /* Fixed logo container height */
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    transition: var(--transition-fast);
}

.logo:hover {
    opacity: 0.85;
}

.logo img {
    max-height: 100%; /* Logo fills the container height */
    max-width: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Nav Menu - Centered */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-list li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 8px 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition-smooth);
}

.nav-list a:hover {
    color: var(--primary-green);
}

.nav-list a:hover::after {
    width: 100%;
}

/* CTA Button */
.nav-cta {
    display: flex;
    align-items: center;
}

/* Buttons - Modern & Accessible */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(10, 126, 62, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 126, 62, 0.3);
}

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

.btn-secondary {
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 126, 62, 0.2);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--primary-green);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

/* Hero Section - Full Background Image */
.hero {
    min-height: 600px;
    padding: 120px 0;
    background-image: url('../images/hero-veterinary.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* Dark overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 90, 44, 0.85) 0%, rgba(10, 126, 62, 0.75) 50%, rgba(14, 159, 79, 0.65) 100%);
    z-index: 1;
}

/* Subtle pattern overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 2;
}

.hero .container {
    position: relative;
    z-index: 3;
    max-width: 900px;
    text-align: center;
}

.hero-content {
    max-width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 24px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 36px;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hide the separate image container since we're using background */
.hero-image {
    display: none;
}

/* Features Section - Trust & Credibility */
.features {
    padding: 100px 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    color: var(--primary-green-dark);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-light);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-teal) 100%);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-green);
    background: var(--bg-white);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3.2rem;
    color: var(--primary-green);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: var(--primary-green-light);
}

.feature-card h3 {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Contact Info Section - Accessible & Clear */
.contact-info {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact-item {
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-item i {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--accent-amber);
    transition: var(--transition-smooth);
}

.contact-item:hover i {
    transform: scale(1.1);
}

.contact-item h3 {
    margin-bottom: 16px;
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-item p {
    opacity: 0.95;
    line-height: 1.8;
    font-size: 1rem;
}

/* Footer - Professional & Organized */
.footer {
    background: var(--primary-green-dark);
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    max-height: 70px;
    max-width: 240px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

.footer-logo p {
    opacity: 0.9;
    line-height: 1.7;
}

.footer-links h3,
.footer-contact h3 {
    margin-bottom: 24px;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-amber);
    transform: translateX(4px);
}

.footer-contact p {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
}

.footer-contact i {
    color: var(--accent-amber);
    font-size: 1.1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
}

.footer-bottom p {
    margin: 8px 0;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .header {
        height: 80px;
    }
    
    .logo-container {
        height: 60px;
    }
    
    .hero {
        min-height: 500px;
        padding: 80px 0;
    }
    
    .hero .container {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.6rem;
    }
    
    .hero-content p {
        font-size: 1.15rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2.4rem;
    }
    
    .nav-list {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
        position: relative;
    }
    
    .navbar {
        gap: 20px;
    }
    
    .logo-container {
        height: 50px;
    }
    
    .logo img {
        max-width: 200px;
    }
    
    /* Hide nav menu on mobile */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-md);
        display: none;
        padding: 20px;
        z-index: 999;
        height: auto;
        justify-content: flex-start;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 15px;
        height: auto;
        align-items: flex-start;
    }
    
    .nav-list li {
        height: auto;
        width: 100%;
    }
    
    .nav-list a {
        height: auto;
        padding: 12px 0;
        width: 100%;
    }
    
    .nav-list a::after {
        bottom: 8px;
    }
    
    /* Hamburger menu */
    .hamburger {
        display: flex;
    }
    
    /* Adjust CTA button for mobile */
    .nav-cta {
        order: 1;
        margin-left: auto;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-info {
        padding: 60px 0;
    }
    
    .footer {
        padding: 50px 0 20px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-logo img {
        max-height: 55px;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .header {
        height: 65px;
    }
    
    .logo-container {
        height: 45px;
    }
    
    .logo img {
        max-width: 160px;
    }
    
    .hero-content h1 {
        font-size: 1.9rem;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
    
    .footer-logo img {
        max-height: 45px;
        max-width: 160px;
    }
}

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

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .language-switcher,
    .hero-buttons,
    .footer {
        display: none;
    }
    
    .hero,
    .features,
    .contact-info {
        padding: 20px 0;
    }
}

/* ════════════════════════════════════════════
   RTL PHONE NUMBER FIX
   Prevents Arabic RTL mode from reversing
   phone numbers. Add this to your style.css
   ════════════════════════════════════════════ */

/* All tel: links always LTR */
a[href^="tel"] {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Wrap any phone number text in <bdi> tag in your HTML — 
   OR use this CSS to force LTR on known containers */

[dir="rtl"] a[href^="tel"],
[dir="rtl"] .nav-cta .btn-primary,
[dir="rtl"] .footer-contact p,
[dir="rtl"] .contact-item p,
[dir="rtl"] .quick-action-btn.phone,
[dir="rtl"] .quick-action-btn.wsapp,
[dir="rtl"] .support-card-info p,
[dir="rtl"] .support-card.phone,
[dir="rtl"] .support-card.wsapp,
[dir="rtl"] .info-card-body .quick-action-btn {
    direction: ltr !important;
    unicode-bidi: embed;
}

/* Footer contact keeps right-aligned text but LTR numbers */
[dir="rtl"] .footer-contact p {
    text-align: right;
    justify-content: flex-end;
}

/* Contact item keeps centered but LTR numbers */
[dir="rtl"] .contact-item p {
    text-align: center;
}