/*
Theme Name: Jeddah National Hospital
Theme URI: https://jnhsa.com
Author: Jeddah National Hospital
Author URI: https://jnhsa.com
Description: A modern, professional WordPress theme designed specifically for Jeddah National Hospital. Features responsive design, bilingual support (Arabic/English), appointment booking, and all essential hospital website features.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jnh-hospital
Tags: hospital, medical, healthcare, responsive, bilingual, appointment-booking, modern
*/

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

:root {
    /* Professional Healthcare Color Scheme - Clean & Minimal (Like Fakeeh & IMC) */
    /* Clean, minimal design matching reference sites */
    
    /* Primary Colors - Professional Blue (Subtle) */
    --primary-color: #1a5490;        /* Professional Blue - Like IMC */
    --primary-dark: #0d3a6b;         /* Dark Blue - Headers */
    --primary-light: #4a7fb8;        /* Light Blue - Hover states */
    
    /* Accent Colors - Minimal, Subtle */
    --accent-color: #0066cc;         /* Subtle Blue Accent */
    --accent-dark: #004499;          /* Dark Accent */
    --accent-light: #e6f2ff;         /* Very Light Blue Background */
    
    /* Brown Accents - For Logo Harmony (Subtle) */
    --brown-primary: #6F4E37;         /* Coffee Brown - Logo color */
    --brown-dark: #4A2C1A;          /* Dark Brown */
    --brown-light: #8B6F47;         /* Light Brown */
    
    /* Backgrounds - Clean Whites & Light Grays */
    --background-cream: #ffffff;    /* Pure White - Like references */
    --background-light: #f8f9fa;      /* Very Light Gray - Subtle sections */
    --background-section: #f5f5f5;   /* Light Gray for sections */
    
    /* Text Colors - Professional, Readable */
    --text-dark: #1a1a1a;           /* Dark Gray-Black - Primary text */
    --text-gray: #666666;           /* Medium Gray - Secondary text */
    --text-light: #999999;          /* Light Gray - Muted text */
    
    /* Base Colors */
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;        /* Subtle Border - Clean */
    
    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    
    /* Shadows - Subtle Only */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    
    /* Legacy support - Keep for compatibility */
    --primary-blue: #1a5490;
    --primary-teal: #0066cc;
    --dark-blue: #0d3a6b;
    --light-blue: #e6f2ff;
    --accent-brown: #0066cc;        /* Alias for accent */
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.rtl {
    direction: rtl;
    font-family: 'Cairo', 'Inter', 'Poppins', Arial, sans-serif;
}

/* Typography - Modern, Professional */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 3rem; 
    font-weight: 800;
    letter-spacing: -0.03em;
}
h2 { 
    font-size: 2.5rem; 
    font-weight: 700;
    letter-spacing: -0.02em;
}
h3 { 
    font-size: 2rem; 
    font-weight: 700;
}
h4 { 
    font-size: 1.5rem; 
    font-weight: 600;
}
h5 { 
    font-size: 1.25rem; 
    font-weight: 600;
}
h6 { 
    font-size: 1rem; 
    font-weight: 600;
}

body.rtl h1, 
body.rtl h2, 
body.rtl h3, 
body.rtl h4, 
body.rtl h5, 
body.rtl h6 {
    font-family: 'Cairo', 'Inter', Arial, sans-serif;
    letter-spacing: 0;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-teal);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10000 !important;
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-top-left {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.header-top-left a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-top-left a:hover {
    color: var(--accent-light);
    transition: color 0.3s ease;
}

.header-top-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.language-switcher a {
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.language-switcher a:hover,
.language-switcher a.active {
    background: rgba(255,255,255,0.2);
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    position: relative;
    width: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 150px;
    max-width: 280px;
    position: relative;
    z-index: 1;
    margin-right: 40px;
    overflow: visible;
}

.site-logo img,
.site-logo .custom-logo-link img,
.site-logo-img {
    height: 60px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.site-tagline {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-start;
    min-width: 0;
    position: relative;
    z-index: 100;
    margin-left: 0;
    padding-left: 0;
}

.main-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: 100%;
    position: relative;
    z-index: 2;
}

.main-menu li {
    position: relative;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    vertical-align: middle;
    z-index: 2;
}

.main-menu > li {
    display: inline-flex;
}

.main-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 14px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    font-size: 0.95rem;
    border-radius: 5px;
    min-height: 44px;
    box-sizing: border-box;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.main-menu a:hover {
    background: var(--accent-light);
    color: var(--primary-color);
}

.main-menu a .lang-en,
.main-menu a .lang-ar {
    display: inline-block;
}

/* Hide submenu items from main menu display */
.main-menu .sub-menu {
    display: none;
}

/* Ensure menu items are on same line */
.main-menu li,
.main-menu li a {
    vertical-align: middle;
}

.main-menu a:hover {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.main-menu .current-menu-item > a {
    color: var(--primary-color);
    background: var(--accent-light);
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-dark);
    padding: 10px;
    margin-left: 15px;
    align-self: center;
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.mobile-menu-toggle:hover {
    background: var(--accent-light);
    color: var(--primary-color);
    transform: scale(1.1);
}

.mobile-menu-toggle.active {
    color: var(--white);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 240px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-section::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>');
    opacity: 0.5;
    z-index: 0 !important;
    pointer-events: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.1;
    z-index: 0 !important;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 100 !important;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-dark);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-gray);
    font-weight: 400;
}

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

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* Stats Section */
.stats-section {
    background: var(--background-light);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background: var(--white);
}

.services-section:nth-child(even) {
    background: var(--background-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.75rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    padding-bottom: 25px;
    letter-spacing: -0.5px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-gray);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    border-top: 4px solid var(--accent-color);
}

.service-icon {
    background: linear-gradient(135deg, var(--accent-light), white);
    padding: 50px 40px;
    text-align: center;
    font-size: 3.5rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
}

.service-content h3 a {
    color: var(--primary-color);
    transition: color 0.3s ease;
    text-decoration: none;
}

.service-content h3 a:hover {
    color: var(--accent-color);
}

.service-content p {
    flex: 1;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-gray);
}

.service-content p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 80px 0 30px;
    border-top: 4px solid var(--accent-color);
}

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

.footer-widget h4 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

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

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: var(--primary-red);
    transition: color 0.3s ease;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }

    .header-top-left {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .header-top-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Hide social media links in header on mobile to save space */
    .header-social-links {
        display: none !important;
    }
    
    .site-logo {
        min-width: auto;
        max-width: 220px !important;
        justify-content: flex-start;
        margin-bottom: 10px;
    }
    
    .site-logo img,
    .site-logo .custom-logo-link img {
        height: 60px !important;
        max-width: 220px !important;
    }
}

/* Appointment Form Styles */
.appointment-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* RTL Specific Styles */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.rtl .header-top-left,
body.rtl .main-menu {
    flex-direction: row-reverse;
}

body.rtl .container {
    direction: rtl;
}

body.rtl .hero-buttons {
    flex-direction: row-reverse;
}

/* Language Toggle Styles */
.lang-ar {
    font-family: 'Cairo', Arial, sans-serif;
}

.site-name-ar {
    font-family: 'Cairo', Arial, sans-serif;
    display: block;
}

body.rtl .lang-en {
    display: none !important;
}

body.rtl .lang-ar {
    display: block !important;
}

body:not(.rtl) .lang-ar {
    display: none !important;
}

body:not(.rtl) .lang-en {
    display: block !important;
}

