/* AMC Retigas Custom Styles */

:root {
    /* New Palette from Image */
    --primary-dark: #003366;   /* 1. Dark Navy */
    --primary-color: #0055A5;  /* 2. Royal Blue */
    --bg-light: #F0F0F0;       /* 3. Light Grey */
    --accent-color: #FFCC00;   /* 4. Signal Yellow (Gas Theme) */
    --secondary-color: #66CCFF; /* 5. Sky Blue */
    
    --text-dark: #212529;
    --text-light: #6c757d;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-accent: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%); /* Blue Gradient */
    --gradient-yellow: linear-gradient(135deg, #FFCC00 0%, #FFD700 100%);
}

/* Bootstrap Overrides to Enforce Palette */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.display-4 {
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Accessibility Focus Indicators */
a:focus, button:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Navbar Customization */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand img {
    max-height: 55px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Slightly thicker for yellow */
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color); /* Yellow accent */
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    /* City lights at night - Energy theme */
    background: url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    min-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 3rem;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Updated overlay using new Dark Navy and Royal Blue */
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.9) 0%, rgba(0, 85, 165, 0.7) 100%);
    z-index: 1;
}

/* Buttons Modernization */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 85, 165, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 85, 165, 0.4);
    /* Darker gradient for hover */
    background: linear-gradient(135deg, var(--primary-dark) 0%, #002244 100%);
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Pulse Button Animation for Emergency */
.pulse-button {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 rgba(220, 53, 69, 0.7);
    border-radius: 50px;
    background: #dc3545; /* Fallback */
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Cards Hover Effect */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hover-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Feature Icons */
.feature-icon-box {
    width: 80px;
    height: 80px;
    background: rgba(0, 85, 165, 0.1); /* Light version of primary */
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.hover-card:hover .feature-icon-box {
    background: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

/* Section Headers */
section h2 {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 40px;
    color: var(--primary-dark);
}

section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

#pronto-intervento h2::after {
    left: 50%;
    transform: translateX(-50%);
    background: white;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: #f8f9fa;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-link:hover {
    color: #fff;
    padding-left: 5px;
}

/* Page Headers (Internal Pages) */
.page-header {
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 100px 0 60px;
    margin-bottom: 3rem;
    color: white;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.9) 0%, rgba(0, 85, 165, 0.8) 100%);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 70vh;
        text-align: center;
        clip-path: none;
        background-attachment: scroll; /* Disable parallax on mobile */
    }
    
    .hero-section .d-flex {
        justify-content: center;
    }
    
    section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .text-md-start {
        text-align: center;
    }
}

/* --- New Animations --- */

/* Floating Animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

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

/* Bounce Animation (Scroll Down) */
.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    text-align: center;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.scroll-down-indicator:hover {
    opacity: 1;
}

/* Hero Background Zoom Effect */
.hero-section {
    animation: bgZoom 20s infinite alternate;
}

@keyframes bgZoom {
    0% {
        background-size: 100% auto;
    }
    100% {
        background-size: 110% auto;
    }
}

/* Counter Section Styles */
.counter-box {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.counter-box:hover {
    transform: translateY(-5px);
}

.counter-box i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.counter-text {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}
