/* ==========================================================================
   Cadeflex - Design System & Modern CSS
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #DB2E2B;
    --primary-dark: #BE2826;
    --dark: #333333;
    --darker: #222222;
    --gray-dark: #424244;
    --gray: #666666;
    --gray-light: #999999;
    --gray-lighter: #CCCCCC;
    --bg-light: #F3F3F3;
    --bg-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Box Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 10px 10px 0px 0px #EAEAEA;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.bg-dark {
    background-color: var(--dark);
    color: var(--bg-white);
}

.bg-dark h2 {
    color: var(--bg-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    transition: var(--transition-normal);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(219, 46, 43, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(219, 46, 43, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    background-color: var(--bg-white);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 5px 0;
}

.header:not(.scrolled) {
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    transition: var(--transition-normal);
}

.header.scrolled .logo img {
    height: 50px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-normal);
}

.nav-link:hover {
    color: var(--dark);
}

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

.header-contact {
    display: flex;
    align-items: center;
}

.tel-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tel-link i {
    font-size: 24px;
    color: var(--primary);
}

.tel-numbers {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.hero {
    margin-top: 90px; /* Offset for fixed header */
    position: relative;
    height: calc(100vh - 90px);
    min-height: 500px;
    max-height: 700px;
    background-color: var(--dark);
    overflow: hidden;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: -1;
}

.slide-content {
    color: var(--bg-white);
    max-width: 600px;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #E6E6E6;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: var(--bg-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background: var(--primary);
}

.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    background-color: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--gray-dark);
    margin-bottom: 30px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--gray);
}

.about-text strong {
    color: var(--primary);
}

.about-text .btn {
    margin-top: 20px;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
}

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

/* ==========================================================================
   Services Grid
   ========================================================================== */
.services .section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.services .section-title p {
    color: var(--gray-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--darker);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: var(--transition-normal);
    pointer-events: none;
}

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

.service-card:hover::after {
    border-color: var(--primary);
}

.service-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

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

/* ==========================================================================
   Clients Carousel
   ========================================================================== */
.clients {
    background-color: var(--bg-white);
    overflow: hidden;
}

.clients .section-title h2 {
    color: var(--dark);
    margin-bottom: 40px;
}

.carousel-container {
    width: 100%;
    position: relative;
}

.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-white) 0%, transparent 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-white) 0%, transparent 100%);
}

.carousel-track {
    display: flex;
    align-items: center;
    gap: 50px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.carousel-track img {
    height: 80px;
    filter: grayscale(100%) opacity(0.6);
    transition: var(--transition-normal);
}

.carousel-track img:hover {
    filter: grayscale(0%) opacity(1);
}

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

/* ==========================================================================
   Footer & Contact Form
   ========================================================================== */
.footer {
    background-color: var(--bg-light);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-contact h2, .footer-form h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.footer-contact h2::after, .footer-form h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
}

.footer-phones h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.footer-email {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0;
    color: var(--dark);
}

.footer-email:hover {
    color: var(--primary);
}

.social-links {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links span {
    font-weight: 600;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--dark);
    color: var(--bg-white);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-address {
    font-style: normal;
    color: var(--gray);
    line-height: 1.8;
}

.contact-form {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--gray-lighter);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(219, 46, 43, 0.1);
}

.contact-form .btn {
    width: 100%;
}

.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid var(--bg-white);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.hidden {
    display: none;
}

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

.form-response {
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
}

.form-response.success { color: #28a745; }
.form-response.error { color: var(--primary); }

.footer-bottom {
    background-color: var(--dark);
    padding: 20px 0;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   WhatsApp Float Button
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition-fast);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
.observe-animate {
    opacity: 0;
    visibility: hidden;
}

.observe-animate.is-visible {
    opacity: 1;
    visibility: visible;
}

.fade-up { transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.is-visible.fade-up { transform: translateY(0); }

.slide-in-left { transform: translateX(-50px); transition: all 0.8s ease-out; }
.is-visible.slide-in-left { transform: translateX(0); }

.slide-in-right { transform: translateX(50px); transition: all 0.8s ease-out; }
.is-visible.slide-in-right { transform: translateX(0); }

.fade-in { transition: opacity 1s ease-in; }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Hero Animation Initial */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease forwards;
}

.slide.active .animate-fade-up {
    opacity: 1;
    transform: translateY(0);
}

.slide.active .delay-1 { transition-delay: 0.3s; }
.slide.active .delay-2 { transition-delay: 0.6s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 992px) {
    .about-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hidden-mobile {
        display: none !important;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        z-index: -1;
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        text-align: center;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-flex {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .hero {
        min-height: 400px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
}

/* ========================================================================== 
   Internal Pages & Timeline Widget 
   ========================================================================== */ 
.page-header { padding: 120px 0 60px; margin-top: 90px; } 
.page-header h1 { font-size: 3rem; color: var(--bg-white); } 
 
.timeline-widget { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; } 
.timeline-widget::before { content: ''; position: absolute; top: 0; left: 50px; height: 100%; width: 4px; background: var(--primary); border-radius: 4px; } 
 
.timeline-item { position: relative; margin-bottom: 40px; padding-left: 100px; } 
.timeline-icon { position: absolute; left: 27px; top: 0; width: 50px; height: 50px; border-radius: 50%; background: var(--dark); color: var(--bg-white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: 4px solid var(--bg-white); z-index: 2; box-shadow: 0 0 0 4px var(--primary); } 
.timeline-content { background: var(--bg-white); padding: 25px; border-radius: 10px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--primary); transition: var(--transition-normal); } 
.timeline-content:hover { transform: translateX(10px); box-shadow: var(--shadow-md); } 
.timeline-content h3 { color: var(--primary-dark); font-size: 1.4rem; margin-bottom: 10px; } 
.timeline-content p { color: var(--gray); font-size: 1.1rem; } 
 
@media screen and (max-width: 768px) { 
  .timeline-widget::before { left: 30px; } 
  .timeline-item { padding-left: 70px; } 
  .timeline-icon { left: 7px; width: 40px; height: 40px; font-size: 1.2rem; } 
}

.page-header { background-image: linear-gradient(to right, rgba(0,0,0,0.8), rgba(219,46,43,0.3)), url('assets/img/page_bg.png'); background-size: cover; background-position: center; border-bottom: 3px solid var(--primary); }


@media screen and (max-width: 768px) { .page-header { padding: 90px 20px 40px; margin-top: 70px; background-attachment: scroll; background-position: center center; } .page-header h1 { font-size: 2.2rem !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); } .slide img { object-position: center; } } 
.page-header h1 { text-shadow: 2px 2px 5px rgba(0,0,0,0.8); font-weight: 800; z-index: 10; position: relative; }

.page-header .animate-fade-up { opacity: 1 !important; transform: translateY(0) !important; animation: pageFadeUp 0.8s ease forwards; } @keyframes pageFadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
