/* Custom styles for St. Hill Insurance */

/* Ensure full width on all devices */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar styles */
#navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

#navbar.sticky {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation link styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #FF8C00;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile menu styles */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Hero section overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.8), rgba(0, 64, 128, 0.8));
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Button styles */
.btn-primary {
    background-color: #003366;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #004080;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

.btn-secondary {
    background-color: #FF8C00;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #FFA500;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #FF8C00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    min-height: 120px;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #FF8C00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
    will-change: transform, opacity;
}

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

/* Hardware acceleration for AOS animations */
[data-aos] {
    will-change: transform, opacity;
}

/* Ensure smooth transitions on grid cards */
.grid > div {
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Custom orange gradient  */
.orange-gradient-adjusted {
    background: linear-gradient(to top, #ff8c00 0%, #ff8c0082 40%, transparent 47%, transparent 100%);
}

/* Styling for text-xl headings in cards */
.absolute > .text-xl {
    padding-left: 5px;
    border-radius: 16px;
    background: linear-gradient(to right, #195594 0%, #003366b3 45%, #ff8c00 60%, transparent 100%);
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-in-out;
}

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

.slide-in-right {
    animation: slideInRight 0.6s ease-in-out;
}

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

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF8C00;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 4rem 0;
    }
}

/* Mobile-specific fixes */
@media (max-width: 640px) {
    /* Ensure all sections fill mobile screen width */
    section, nav, footer {
        width: 100%;
        box-sizing: border-box;
    }

    /* Remove any potential margin issues */
    .max-w-7xl {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure hero section fills screen */
    #home {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }

    /* Fix any container padding issues */
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .sm\:px-6 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .lg\:px-8 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Line clamp utilities for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

.bg-dark-navy {
    background-color: #014e6d;
}