/* Custom styles for Hobbs Purnell Oil Co */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A2342;
}
::-webkit-scrollbar-thumb {
    background: #00D4AA;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5FFFD4;
}

/* Selection color */
::selection {
    background: #00D4AA;
    color: #0A2342;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes scroll-down {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

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

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

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.active > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.active > *:nth-child(8) { transition-delay: 0.8s; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Service card hover glow */
.service-card:hover {
    box-shadow: 0 0 40px rgba(0, 212, 170, 0.15);
}

/* Testimonial card hover */
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Area card hover */
.area-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.area-card:hover {
    transform: translateY(-4px);
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 35, 66, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transition */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Mobile menu button animation */
#hamburger span:nth-child(1) {
    transform-origin: center;
}
#hamburger span:nth-child(2) {
    transform-origin: center;
}
#hamburger span:nth-child(3) {
    transform-origin: center;
}

.menu-open #hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-open #hamburger span:nth-child(2) {
    opacity: 0;
}
.menu-open #hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, .service-card, .testimonial-card {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
