/* styles.css */
:root {
    /* Colors */
    --primary-color: #000000;
    --secondary-color: #FFD700;
    /* Gold */
    --accent-color: #adcbe1;
    /* Light Blue */
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #F9F9F9;
    --bg-white: #FFFFFF;
    --bg-dark: #1a1a1a;
    --white: #FFFFFF;
    --whatsapp-green: #25D366;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    /* Page transition fade */
}

body.fade-out {
    opacity: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    border: 5px solid #333;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

/* Base Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--spacing-xl) 0;
    /* Removed default opacity/transform here, handled by .fade-up class now */
}

/* Helper for pages with fixed header */
.header-offset {
    padding-top: 120px;
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle,
.menu-icon {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 0;
    overflow: hidden;
    /* Prevent overflow from zoom animation */
}

.slideshow,
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s ease;
    /* Zoom effect transition */
    transform: scale(1);
}

.slide.active {
    opacity: 1;
    transform: scale(1.05);
    /* Slow zoom effect */
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    /* Improved overlay */
}

.hero .content {
    max-width: 900px;
    padding: 20px;
    z-index: 2;
    /* Animation handled by JS using fade-up class */
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-login {
    display: inline-block;
    padding: 14px 35px;
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-color), #e6c200);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    filter: brightness(1.1);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0) scale(0.98);
}


/* Stats Section */
.stats {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23222222" fill-opacity="0.4" fill-rule="evenodd"%3E%3Ccircle cx="3" cy="3" r="3"/%3E%3Ccircle cx="13" cy="13" r="3"/%3E%3C/g%3E%3C/svg%3E');
    /* Subtle texture */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--white);
}

.stat-item p {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Services Portfolio Grid */
.service-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-portfolio-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    top: 0;
}

.service-portfolio-item:hover {
    top: -10px;
    box-shadow: var(--shadow-lg);
}

.service-content {
    padding: 30px;
    flex-grow: 1;
}

.service-content h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-content p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.service-portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-portfolio-item:hover img {
    transform: scale(1.1);
}

/* About Section */
.about {
    background-color: var(--white);
}

.about-block {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
}

.about-block.reverse {
    flex-direction: row-reverse;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.about-text h3::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 4px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 0;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    perspective: 1000px;
    /* For 3D tilt */
}

/* 3D Tilt Effect Class (applied via JS or generic hover) */
.tilt-effect {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.1s ease-out;
    /* Super fast for mouse tracking, or css hover */
    /* We'll use JS for the real tilt, but here is a simple hover fallback */
}

.about-image:hover .tilt-effect {
    /* Simple scale if JS fails */
    transform: scale(1.02);
}

/* Testimonials Section */
.testimonials {
    background-color: var(--bg-light);
    padding: 100px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-content i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: block;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.testimonial-author h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: var(--primary-color);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
}


/* Contact Section Styles - Updated */
.contact-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.contact-info ul {
    gap: 30px;
}

.contact-info li a {
    width: 180px;
    padding: 40px 20px;
}

/* Floating WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp-green);
    color: var(--white);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}


/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 0;
}

.derechos {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-block,
    .about-block.reverse {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .about-text h3 {
        text-align: center;
    }

    .about-text h3::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {

    /* Mobile Navigation */
    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--white);
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .menu-toggle:checked~nav {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }

    nav ul li {
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 10px;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    .menu-toggle {
        display: none;
    }

    .header-offset {
        padding-top: 100px;
    }

    /* Hero Text */
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .service-portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-info ul {
        flex-direction: column;
        align-items: center;
    }

    .logo img {
        height: 50px;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 2rem;
    }
}