/* Global Variables */
:root {
    --primary-color: #ff4d4d; /* Main red color */
    --secondary-color: #333; /* Dark gray */
    --text-color: #fff; /* White text */
    --accent-color: #f4a261; /* Orange for hover effects */
    --background-dark: #222; /* Dark background */
    --background-darker: #111; /* Darker background */
    --semi-transparent: rgba(255, 255, 255, 0.2); /* Semi-transparent white */
    --frosted-bg: rgba(255, 255, 255, 0.15); /* Frosted glass effect */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Common shadow */
    --transition: 0.3s ease; /* Common transition */
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: url("../images/background.jpg") no-repeat center center fixed;
    background-size: cover;
    background-color: var(--background-dark); /* Fallback */
}

/* Typography */
h1, h2, h3, h4 {
    text-align: center;
    margin-top: 20px;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin: 10px 0;
    text-align: center;
    color: var(--text-color);
}

/* Common Components */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 40px auto;
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    display: block;
}

.contact-container {
    max-width: 1200px;
    width: 90%;
    margin: 40px auto;
    display: flex;
    gap: 20px;
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

footer {
    background: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.nav {
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all var(--transition);
}

.nav a:hover {
    background: var(--semi-transparent);
    color: var(--primary-color);
    transform: scale(1.05);
}

.glow-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.2rem;
    color: var(--text-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    text-decoration: none;
    transition: color var(--transition);
}

.glow-button:hover {
    color: #000;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    z-index: 1000;
    text-align: center;
    color: #000;
    border: 1px solid var(--semi-transparent);
}

.popup.show {
    display: block;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.popup-overlay.show {
    display: block;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow);
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Buttons */
.send-button, .return-to-home-button {
    background: var(--semi-transparent);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: background var(--transition);
    margin: 0 10px;
}

.send-button:hover, .return-to-home-button:hover {
    background: var(--primary-color);
}

.home-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    width: fit-content;
    transition: background var(--transition);
}

.home-btn:hover {
    background: #e60000;
}

/* Main Page Styles */
header {
    position: relative;
    min-height: 500px;
    text-align: center;
    overflow: visible;
}

.logo-container {
    text-align: center;
    margin: 1rem 0;
    z-index: 2;
    width: 100%;
}

.logo {
    transition: all 0.8s ease;
    max-width: 200px; /* Reduced size for larger screens */
    height: auto;
    display: block;
    margin: 0 auto;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

header .header-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

header .sub-header {
    font-size: 1.8rem;
    margin-top: 10px;
}

.hero {
    text-align: center;
    padding: 50px 20px;
    background: var(--background-darker);
}

.hero img {
    max-width: 300px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.services {
    padding: 60px 20px;
    background: var(--background-dark);
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.testimonials {
    padding: 60px 20px;
    background: var(--background-darker);
    text-align: center;
}

.testimonial-slider {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial {
    display: none;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 10px;
    animation: fadeIn 1s ease;
}

.testimonial.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.map-container {
    text-align: center;
    margin: 40px 0;
}

.map-container iframe {
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 50%;
    text-decoration: none;
    display: none;
    transition: background var(--transition);
}

.back-to-top:hover {
    background: #e60000;
}

/* Contact Page Styles */
.contact-container .intro-section {
    flex: 1;
    padding: 15px;
    background: var(--secondary-color);
    text-align: center;
}

.contact-container .services-column {
    flex: 1;
    padding: 15px;
    background: var(--secondary-color);
    text-align: center;
    overflow-y: auto;
    max-height: 600px;
}

.contact-container .calendar-section {
    flex: 2;
    padding: 15px;
    background: #fff;
    color: #000;
}

.contact-container .services.compact {
    padding: 5px 0;
    background: transparent;
}

.contact-container .services.compact .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px;
}

.contact-container .services.compact .service-card {
    background: #444;
    padding: 8px;
    border-radius: 5px;
}

.contact-container .services.compact .service-card i {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-container .services.compact .service-card h3 {
    font-size: 0.8rem;
    line-height: 1.1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group select {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path d="M0 0h10L5 5z" fill="%23333"/></svg>') no-repeat right 10px center;
    background-size: 10px;
}

.time-slot {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #e0f7fa;
    cursor: pointer;
    font-size: 14px;
    transition: background var(--transition);
}

.time-slot:hover {
    background: #d1e7dd;
}

.time-slot.selected {
    background: #a3cfbb;
    border-color: #a3cfbb;
}

.time-slot.booked {
    background: #d3d3d3;
    border-color: #d3d3d3;
    cursor: not-allowed;
    opacity: 0.6;
}

#submit-btn {
    background: #28a745;
    color: var(--text-color);
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background var(--transition);
}

#submit-btn:hover {
    background: #218838;
}

/* About Us Page Styles */
.about-us-page .nav {
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.about-us-page .team-card {
    width: 280px;
    height: 280px;
    position: relative;
    perspective: 1000px;
}

.about-us-page .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.about-us-page .team-card:hover .card-inner {
    transform: rotateY(180deg);
}

.about-us-page .card-front,
.about-us-page .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-us-page .card-front {
    background: var(--secondary-color);
}

.about-us-page .card-back {
    background: var(--frosted-bg);
    backdrop-filter: blur(10px);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: var(--text-color);
}

.about-us-page .card-back h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.about-us-page .card-back .title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.about-us-page .card-back p {
    font-size: 0.9rem;
    margin: 0;
}

.about-us-page .team-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    z-index: 1;
}

.about-us-page .team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Animations */
.fade-in {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title.in-view {
    opacity: 1;
    transform: translateY(0);
}

.logo-animated {
    opacity: 1;
    transform: scale(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        min-height: 300px;
        overflow: visible;
    }

    header h3 {
        font-size: 2rem;
    }

    header .sub-header {
        font-size: 1.2rem;
    }

    .nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .container, .contact-container {
        margin: 20px auto;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-container .intro-section,
    .contact-container .services-column,
    .contact-container .calendar-section {
        flex: none;
        width: 100%;
    }

    .contact-container .services.compact .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .contact-container .services.compact .service-card h3 {
        font-size: 0.7rem;
    }

    .contact-container .services.compact .service-card i {
        font-size: 0.9rem;
    }

    .contact-container .calendar-section iframe {
        height: 400px;
    }

    .map-container iframe {
        width: 100%;
        height: 300px;
    }

    .about-us-page .team-card {
        width: 250px;
        height: 250px;
    }

    .about-us-page .logo {
        max-width: 150px; /* Reduced size for mobile */
        height: auto;
    }
}