/* 
 * Dr. Aly Alkomey Clinic - Main Stylesheet
 * Colors: Red (#DC1F26), Gray (#6C757D), White (#FFFFFF)
 */

:root {
    --primary-color: #DC1F26;
    --secondary-color: #6C757D;
    --dark-color: #1a1a1a;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    color: var(--dark-color);
    background-color: var(--white);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

/* Top Bar */
.top-bar {
    background: var(--dark-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--primary-color);
}

.top-bar i {
    margin-left: 8px;
}

/* Header & Navbar */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand img {
    height: 60px;
    width: auto;
}

.clinic-name {
    display: flex;
    flex-direction: column;
}

.clinic-name h1 {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.clinic-name span {
    font-size: 13px;
    color: var(--secondary-color);
}

.navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 600;
    padding: 10px 20px !important;
    margin: 0 5px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 20px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 40px);
}

.btn-appointment {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: bold;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.btn-appointment:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01419 100%);
    color: var(--white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 1s;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1.2s;
}

.hero-content .btn {
    animation: fadeInUp 1.4s;
}

.hero-image {
    position: relative;
    z-index: 2;
    animation: fadeInLeft 1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    max-width: 350px;
    max-height: 400px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 991px) {
    .hero-image img {
        max-width: 300px;
        max-height: 350px;
    }
}

/* Mobile Responsive for Hero Section */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .hero-content {
        text-align: center !important;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content h3 {
        font-size: 18px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-content .d-flex {
        justify-content: center !important;
    }
    
    .hero-content .btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .hero-image img {
        max-width: 250px;
        max-height: 300px;
        margin-top: 20px;
    }
}

/* Page Header - Same style as hero but for internal pages */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a01419 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.page-header h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: 20px;
    margin: 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .page-header p {
        font-size: 18px;
    }
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: bold;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.section-title p {
    color: var(--secondary-color);
    margin-top: 15px;
    font-size: 18px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(220, 31, 38, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #a01419);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotate(360deg);
}

.service-card h4 {
    font-size: 22px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--secondary-color);
    line-height: 1.8;
}

/* Service Cards Mobile Responsive */
@media (max-width: 768px) {
    .service-card {
        padding: 20px 15px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .service-card h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .service-card p {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* About Section */
.about-section {
    padding: 80px 0;
}

.about-content h2 {
    font-size: 36px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-content h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 2;
}

.about-features {
    list-style: none;
    padding: 0;
}

.about-features li {
    padding: 10px 0;
    color: var(--dark-color);
    font-weight: 500;
}

.about-features li i {
    color: var(--primary-color);
    margin-left: 10px;
    font-size: 18px;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: cover;
}

@media (max-width: 991px) {
    .about-image img {
        max-width: 300px;
    }
}

/* Working Hours */
.working-hours {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px;
    border-radius: 15px;
    margin-top: 30px;
}

.working-hours h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.working-hours p {
    font-size: 18px;
    margin-bottom: 10px;
}

.working-hours i {
    margin-left: 10px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.contact-info {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.contact-item {
    display: flex;
    align-items: start;
    margin-bottom: 30px;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #a01419);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--secondary-color);
    margin: 0;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--dark-color);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 31, 38, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 40px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.footer-logo img:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

.footer-content {
    margin-bottom: 40px;
}

.footer h3 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer p {
    color: #bbb;
    line-height: 2;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    color: #bbb;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Footer Mobile Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-logo img {
        max-width: 120px;
    }
    
    .footer h3 {
        text-align: center;
        font-size: 20px;
    }
    
    .footer h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer p {
        text-align: center;
        font-size: 14px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .service-card {
        margin-bottom: 30px;
    }
    
    .navbar-brand img {
        height: 50px;
    }
    
    .clinic-name h1 {
        font-size: 16px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}