:root {
    --primary-color: #b5312a;
    --primary-dark: #9a2822;
    --text-dark: #333;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Animation Keyframes */
@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);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

/* Staggered animations */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Floating Header */
.navbar {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.navbar-brand img {
    height: 60px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(181, 49, 42, 0.9) 0%, rgba(154, 40, 34, 0.9) 100%),
                url('/img/hero-back.jpeg') center/cover;
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary-custom {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: #f8f9fa;
    color: var(--primary-color); /* Keep the same color, don't change to white */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Hero Form */
.hero-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hero-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.hero-form .form-control,
.hero-form .form-select {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    height: auto;
    min-height: 48px;
    transition: all 0.3s ease;
}

.hero-form .form-control:focus,
.hero-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(181, 49, 42, 0.25);
    transform: translateY(-2px);
}

.hero-form .btn-submit {
    background: var(--primary-color);
    border: none;
    padding: 12px;
    width: 100%;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-form .btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(181, 49, 42, 0.3);
}

/* Quick Icons - Overlapping Design */
.quick-icons-section {
    position: relative;
    z-index: 10;
    margin-top: -40px;
    margin-bottom: 40px;
}

.quick-icons {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.quick-icons:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.icon-item {
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.icon-item:hover {
    transform: translateY(-5px);
    background: rgba(181, 49, 42, 0.05);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.icon-item:hover .icon-circle {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(181, 49, 42, 0.3);
}

.icon-circle i {
    font-size: 1.5rem;
}

.icon-text {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    transition: all 0.3s ease;
}

.icon-item:hover .icon-text {
    color: var(--primary-color);
}

/* Section Styling */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Services Section - Increased Image Height */
.service-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.service-card img {
    width: 100%;
    height: 350px; /* Increased from 250px to 350px */
    object-fit: cover;
    transition: all 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card-body {
    padding: 1.5rem;
    text-align: center;
}

.service-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.service-card:hover .service-card-title {
    color: var(--primary-color);
}

/* CTA Banner */
.cta-banner {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 3rem;
    transition: all 0.3s ease;
    display: block;
}

.cta-banner:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Bootstrap Carousel Customization */
.reviews-carousel {
    position: relative;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    min-height: 280px;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Custom carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: -25px;
}

.carousel-control-next {
    right: -25px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary-dark);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .review-card {
        margin: 0;
    }
}

/* Full Width Image Sections - Remove padding */
.full-width-section {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.full-width-section img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

.full-width-section:hover img {
    transform: scale(1.02);
}

/* Hearing Aids Section - White Background */
.hearing-aids-section {
    background: white;
}

/* Promotion Section - Custom Background Color */
.promotion-section {
    background: #bf5a54;
}

/* Contact Section */
.contact-section {
    background: #f8f9fa;
}

.branch-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.branch-logo {
    width: 100px;
    height: 100px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    padding: 10px;
    transition: all 0.3s ease;
}

.branch-card:hover .branch-logo {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(181, 49, 42, 0.2);
}

.branch-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branch-info h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.branch-info p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.branch-info strong {
    color: var(--text-dark);
}

.map-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-link:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

/* Appointment Form Styling */
.appointment-form .form-control,
.appointment-form .form-select {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    height: auto;
    min-height: 48px;
    transition: all 0.3s ease;
}

.appointment-form .form-control:focus,
.appointment-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(181, 49, 42, 0.25);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin: 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .navbar-brand img {
        height: 50px;
    }
    
    /* Center menu items in mobile view */
    .navbar-collapse .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }

    .icon-item {
        flex-direction: column;
        text-align: center;
    }

    .icon-circle {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .service-card img {
        height: 300px; /* Slightly smaller on mobile */
    }

    /* Mobile spacing for hero button */
    .btn-primary-custom {
        margin-bottom: 2rem;
    }
}