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

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

body.dark-mode {
    --primary-color: #60a5fa;
    --secondary-color: #1e293b;
    --accent-color: #f43f5e;
    --background-color: #0f172a;
    --text-color: #f1f5f9;
    --light-gray: #1e293b;
    --dark-gray: #94a3b8;
    --white: #1e293b;
}

body.dark-mode header,
body.dark-mode .service-card,
body.dark-mode .template-card,
body.dark-mode .preview-content,
body.dark-mode .contact-form {
    background-color: #1e293b;
    color: #e2e8f0;
}

body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
    color: #f1f5f9;
}

body.dark-mode p {
    color: #e2e8f0;
}

body.dark-mode .service-card h3,
body.dark-mode .template-card h3 {
    color: #60a5fa;
}

body.dark-mode .section-header h2 {
    color: #60a5fa;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

body.dark-mode .section-header p {
    color: #b0b8c1;
}

body.dark-mode .preview-hero::after {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
}

body.dark-mode .template-img {
    background-color: #0f172a;
}

body.dark-mode footer {
    background-color: #0f172a;
}

body.dark-mode .main-nav a {
    color: #d1d5db;
}

body.dark-mode .main-nav a:hover {
    color: #60a5fa;
}

body.dark-mode .logo h1 {
    color: #60a5fa;
}

body.dark-mode .logo span {
    color: #d1d5db;
}

body.dark-mode .service-preview-item,
body.dark-mode .menu-item,
body.dark-mode .car-item,
body.dark-mode .package-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .food-img,
body.dark-mode .car-img {
    background-color: #0f172a;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    bottom: -10px;
    left: 20%;
    border-radius: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 700px;
    margin: 15px auto 0;
    line-height: 1.6;
}

section {
    padding: 80px 0;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

header.dark-mode {
    background-color: #1a2234;
    border-bottom: 3px solid #60a5fa;
}

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

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.logo:hover h1::after {
    width: 100%;
}

.logo span {
    color: var(--secondary-color);
    font-weight: 400;
}

.main-nav {
    display: flex;
}

.main-nav li {
    margin-right: 25px;
}

.main-nav li:last-child {
    margin-right: 0;
}

.main-nav a {
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s, transform 0.3s;
    position: relative;
    display: inline-block;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

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

.contact-btn {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.contact-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px) !important;
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('https://images.unsplash.com/photo-1467232004584-a241de8bcf5d?ixlib=rb-4.0.1&auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: var(--white);
    padding: 150px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease;
}

.primary-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s;
    animation: fadeInUp 1.2s ease;
}

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

/* Services Section */
.services {
    background-color: var(--white);
}

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

.service-card {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(255, 255, 255, 0) 75%);
    z-index: -1;
    transition: width 0.5s ease;
}

.service-card:hover::before {
    width: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    margin-bottom: 20px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 150px;
    width: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

.service-card:hover .service-icon img {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Templates Section */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.template-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--light-gray);
    position: relative;
    overflow: hidden;
}

.template-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: right;
}

.template-card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.template-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 20px 20px 10px;
}

.template-card p {
    color: var(--dark-gray);
    margin: 0 20px 20px;
}

.template-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    margin: 0 20px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.template-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: -1;
}

.template-btn:hover::before {
    left: 100%;
}

.template-btn:hover {
    background-color: var(--secondary-color);
}

.template-img {
    height: 150px;
    overflow: hidden;
    position: relative;
    border-radius: 10px 10px 0 0;
}

.template-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.template-card:hover .template-img img {
    transform: scale(1.05);
}

/* About Section */
.about {
    background-color: var(--light-gray);
}

.about-content {
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-text {
    display: block;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.contact-info {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    color: var(--white);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.5rem;
    margin-left: 15px;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    margin-top: 30px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    background-color: #fff;
}

.social-icons a:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.social-icons a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-icons a i {
    font-size: 20px;
    color: #3498db;
}

/* Discount Timer Section */
.discount-timer {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.dark-mode .discount-timer {
    background-color: #f43f5e;
}

.timer-content {
    animation: pulse 2s infinite;
}

.timer-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--white);
}

.timer-content p {
    font-size: 1.1rem;
    color: var(--white);
}

#discount-code {
    background-color: var(--white);
    color: var(--accent-color);
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 1px;
}

body.dark-mode #discount-code {
    color: #f43f5e;
}

#countdown {
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    width: 50px;
    height: 50px;
    background-color: #1e293b;
    color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.dark-mode-toggle img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

body.dark-mode .dark-mode-toggle {
    background-color: #f8f9fa;
    color: #0f172a;
}

/* Floating contact buttons */
.floating-contact {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    z-index: 99;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    padding-right: 15px;
}

.floating-btn:hover {
    transform: scale(1.05);
    width: 110px;
    border-radius: 30px;
}

.floating-btn i {
    font-size: 24px;
    margin-left: 8px;
}

.floating-btn span {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 14px;
}

.floating-btn:hover span {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
}

.phone-btn {
    background-color: #3498db;
    color: white;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

/* Enhanced animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* SVG Animations */
.dental-svg rect, .dental-svg circle, .dental-svg path {
    transition: all 0.5s;
}

.restaurant-svg rect, .restaurant-svg circle {
    transition: all 0.5s;
}

.car-svg rect, .car-svg circle, .car-svg path {
    transition: all 0.5s;
}

.template-card:hover .dental-svg .path {
    stroke: var(--accent-color);
}

.template-card:hover .restaurant-svg .rect {
    fill: var(--accent-color);
}

.template-card:hover .car-svg .path {
    fill: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: center;
        display: none;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .mobile-menu-icon {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .services-grid, .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat {
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 50px 0;
    }
    
    .hero {
        padding: 100px 0;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .contact-form, .contact-info {
        padding: 20px;
    }
}