/* Custom CSS for Sunrise Pool Services */

/* Colors */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #f59e0b;
    --accent-color: #0ea5e9;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --success-color: #10b981;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 180px; /* Increased to account for larger navbar height */
}

/* Bootstrap color customizations */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

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

.btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: white;
}

/* Video Hero Section */
.hero-video-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(30 58 138 / 40%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

/* Navbar Styles */
.navbar {
    background: rgba(30, 58, 138, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 0.75rem 0; /* Increased padding to accommodate larger logo */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Add subtle shadow for depth */
}

.navbar-brand {
    padding: 0.5rem 0; /* Add padding around the logo */
    display: flex;
    align-items: center;
}

.logo-image {
    max-width: 249px; /* Set max width to maintain aspect ratio */
    height: auto; /* Let height adjust automatically */
    max-height: 150px; /* But cap the height at 150px */
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); /* Add subtle logo shadow */
}

/* Ensure navbar items are properly aligned with larger logo */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-link {
    font-weight: 600; /* Bolder font weight for more presence */
    font-size: 1.2rem; /* Larger font size for better visibility */
    color: rgba(255, 255, 255, 0.95) !important; /* Brighter white */
    padding: 0.75rem 1.25rem; /* More generous padding */
    margin: 0 0.1rem; /* Small margin between items */
    border-radius: 6px; /* Subtle rounded corners */
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle text shadow for depth */
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
    background-color: rgba(255, 255, 255, 0.1); /* Light background on hover */
    transform: translateY(-1px); /* Subtle lift effect */
    text-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Enhanced shadow on hover */
}

.navbar-nav .nav-link:focus {
    color: var(--secondary-color) !important;
    background-color: rgba(255, 255, 255, 0.15);
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Active link styling */
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

/* Dropdown menu enhancements */
.dropdown-menu {
    background-color: rgba(30, 58, 138, 0.98);
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color) !important;
    transform: translateX(5px); /* Subtle slide effect */
}

.dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--secondary-color) !important;
}

/* Phone number link special styling */
.navbar-nav .nav-link.fw-bold.text-warning {
    background: linear-gradient(135deg, var(--secondary-color), #ffb800);
    color: white !important;
    border-radius: 25px;
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-left: 0.5rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    animation: pulse-glow 2s infinite;
}

.navbar-nav .nav-link.fw-bold.text-warning:hover {
    background: linear-gradient(135deg, #ffb800, var(--secondary-color));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Pulse animation for phone number */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    }
}

/* Navbar toggler positioning for mobile */
.navbar-toggler {
    padding: 0.6rem 0.8rem;
    font-size: 1.4rem;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* Service Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.service-area-card:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
}

/* Partner Logo Carousel */
.logo-carousel {
    overflow: hidden;
    white-space: nowrap;
    background: rgba(255,255,255,0.1);
    padding: 20px 0;
    border-radius: 10px;
}

.logo-slide {
    display: inline-flex;
    animation: scroll 20s linear infinite;
    align-items: center;
    gap: 3rem;
}

.partner-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.partner-logo:hover {
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Section Spacing */
section {
    padding: 80px 0;
}

.py-4 {
    padding: 2rem 0 !important;
}

.py-5 {
    padding: 4rem 0 !important;
}

/* Background Utilities */
.bg-light {
    background-color: #f8f9fa !important;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        padding-top: 120px; /* Reduced padding for mobile with smaller logo */
    }
    
    .navbar {
        padding: 0.5rem 0; /* Less padding on mobile */
    }
    
    .logo-image {
        max-height: 80px; /* Smaller logo on mobile */
        max-width: 133px; /* Maintain aspect ratio (249/150 * 80) */
    }
    
    .navbar-nav .nav-link {
        font-size: 1.1rem; /* Keep larger size on mobile */
        padding: 0.7rem 1rem;
        margin: 0.2rem 0; /* Vertical margin for mobile */
    }
    
    .navbar-nav .nav-link.fw-bold.text-warning {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
        margin: 0.5rem 0;
        animation: none; /* Disable animation on mobile for performance */
    }
    
    .hero-video-section {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-content .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .logo-slide {
        gap: 2rem;
    }
    
    .partner-logo {
        height: 40px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 100px; /* Further reduced for small screens */
    }
    
    .logo-image {
        max-height: 60px; /* Even smaller on very small screens */
        max-width: 100px;
    }
    
    .hero-video-section {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-content .display-3 {
        font-size: 2rem;
    }
    
    .hero-content .h5 {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Contact Section Styling 
 background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%) !important;
*/
.bg-primary { 
	background: linear-gradient(92deg, var(--primary-color) 0%, #4c69c4 100%) !important;
    border-bottom: 3px solid #799dc4;
}
 
.card-body footer{
    background: none !important;
}


/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%) !important;
}

footer a:hover {
    color: var(--secondary-color) !important;
    transition: color 0.3s ease;
}

/* Form Styling */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

/* Map Styling */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.map-container iframe {
    transition: all 0.3s ease;
    filter: grayscale(20%) contrast(1.1);
}

.map-container:hover iframe {
    filter: grayscale(0%) contrast(1.2);
    transform: scale(1.02);
}

.map-overlay {
    transition: opacity 0.3s ease;
}

.map-container:hover .map-overlay {
    opacity: 0.8;
}

/* Service area map responsive */
@media (max-width: 768px) {
    .map-container iframe {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .map-container iframe {
        height: 250px;
    }
    
    .map-overlay small {
        font-size: 0.75rem;
    }
}

/* Utility Classes */
.shadow-custom {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Video Fallback */
.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    z-index: 1;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.nav-link:focus,
.card:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-video-section,
    .logo-carousel {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .container {
        max-width: 100% !important;
    }
}