/* Custom Animations and Styles for Dulaney Media Group */

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
}

/* Navbar Scroll Effect */
#navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 100%);
    backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background: rgba(0,0,0,0.98);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

/* Animated Logo Float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Shine Effect */
@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

/* Hero Background with Parallax Effect */
#hero-bg {
    transition: transform 0.1s ease-out;
}

/* Division Cards Hover Effects */
.division-card {
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.division-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
}

/* Gradient Text Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(45deg, #D4AF37, #F4E5B8, #D4AF37);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
}

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

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

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

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

.fade-in-left {
    animation: fadeInLeft 1s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 1s ease-out forwards;
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

/* Pulse Animation for CTA */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Glowing Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Slide In Animations */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Particle Background Effect */
.particle {
    position: absolute;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ---- Legal Pages: Professional Layout Helpers ---- */
/* Gold brand color utilities for non-Tailwind pages */
.text-gold { color: #D4AF37; }
.border-gold { border-color: #D4AF37; }
.bg-gold { background-color: #D4AF37; }

/* Hero section for legal pages */
.legal-hero {
    position: relative;
    height: 300px;
    background-image: url('../images/hero.jpeg');
    background-size: cover;
    background-position: center;
}
.legal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
.legal-hero .hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    z-index: 1;
}
.hero-subtitle {
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-size: 1.125rem; /* slightly larger for visibility */
}
.hero-title {
    color: #ffffff;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; /* slightly larger headline on mobile */
    text-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
@media (min-width: 768px) {
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
}

/* Centered, gold-bordered content box */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border: 1px solid #D4AF37;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.legal-content {
    color: #d1d5db; /* gray-300 */
    line-height: 1.8;
}
.legal-container h1 {
    margin-bottom: 0.75rem;
}
.legal-container .meta {
    color: #9ca3af; /* gray-400 */
    margin-bottom: 1rem;
}

/* Back to Home link (top-left) */
.back-home {
    position: fixed;
    top: 16px;
    left: 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.8;
    z-index: 60; /* overlay above hero/nav */
}
.back-home:hover {
    opacity: 1;
    color: #D4AF37;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #D4AF37, #B8941E);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

/* Selection Color */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fff;
}

/* Smooth Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

/* Border Animation */
@keyframes border-dance {
    0%, 100% {
        border-color: rgba(212, 175, 55, 0.3);
    }
    50% {
        border-color: rgba(212, 175, 55, 0.8);
    }
}

.border-animate {
    animation: border-dance 3s ease-in-out infinite;
}

/* Text Gradient Animation */
.text-gradient {
    background: linear-gradient(90deg, #D4AF37 0%, #F4E5B8 50%, #D4AF37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s linear infinite;
}

/* Button Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top-color: #D4AF37;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .animate-float {
        animation: none;
    }
    
    .division-card:hover {
        transform: translateY(-5px);
    }
}

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

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #000;
    }
}

/* Hero Background */
#hero-bg {
    background-image: url('../images/hero.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
}

/* Improve parallax performance on supported browsers */
#home {
    perspective: 1px;
    transform-style: preserve-3d;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #D4AF37;
    color: #000;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Navbar scrolled enhanced state */
#navbar.scrolled {
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #D4AF37, #B8941E);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 50;
    border: 1px solid #fff; /* Thin white border to stand out */
}
.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-to-top:hover {
    background: #D4AF37;
}

/* Footer: enforce bold white text across all elements */
footer, footer p, footer h3, footer h4, footer a, footer li, footer span {
    color: #fff !important;
    font-weight: 700 !important;
}

/* Contact form input borders: ensure thin white borders */
#contact-form input, #contact-form select, #contact-form textarea {
    border-color: #ffffff !important;
}

/* Division cards: ensure gold border thin */
.division-card {
    border-color: #D4AF37 !important;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ffffff; /* White border around the outside */
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 1rem;
}
.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cookie-banner__text {
    color: #ccc;
    font-size: 0.95rem;
}
.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
}
.cookie-btn {
    padding: 0.5rem 0.9rem;
    border: 1px solid #D4AF37;
    background: transparent;
    color: #D4AF37;
    cursor: pointer;
}
.cookie-btn.accept {
    background: #D4AF37;
    color: #000;
}
.cookie-btn:hover {
    filter: brightness(1.05);
}

/* Stack cookie banner on very narrow screens */
@media (max-width: 420px) {
    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
    .cookie-banner__actions {
        flex-direction: column;
    }
    .cookie-btn,
    .cookie-btn.accept {
        width: 100%;
    }
}