/*
   SEDSYCA.RYA Main Styles
   Theme: Professional, Secure, Modern (Dark Blue/Grey with Gold accents)
   Inspired by Buzzworthy Studio - Cinematic & Immersive
*/

:root {
    /* Paleta basada en escudo: Azul marino, blanco, dorado */
    --primary-color: #0a1628;
    --secondary-color: #1e3a5f;
    --navy-blue: #1e3a8a;
    --accent-color: #c9a227;
    --accent-hover: #b8922a;
    --gold-light: #d4af37;

    /* Colores del uniforme: khaki y negro */
    --khaki: #c4a35a;
    --uniform-black: #1a1a1a;

    /* Textos */
    --text-light: #f8fafc;
    --text-dark: #0a1628;
    --text-muted: #94a3b8;

    /* Efectos */
    --glass-bg: rgba(30, 58, 138, 0.15);
    --glass-border: rgba(201, 162, 39, 0.2);
    --gradient-overlay: linear-gradient(135deg, rgba(10, 22, 40, 0.7), rgba(30, 58, 95, 0.5));
    --gradient-brand: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #1e3a8a 100%);

    /* Tipografía y transiciones */
    --font-main: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-color);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0d1b2a;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
}

.loader-logo span {
    color: var(--accent-color);
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--accent-color);
    animation: loading 1s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.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 > * {
    opacity: 1;
    transform: translateY(0);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.main-header.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

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

.logo h1,
.logo .logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: var(--transition);
}

.logo:hover h1,
.logo:hover .logo-text {
    transform: scale(1.02);
}

.logo span {
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

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

.main-nav a:hover:not(.btn-primary) {
    color: var(--accent-color);
}

.main-nav a.active {
    color: var(--accent-color);
}

/* Dropdown Menu */
.main-nav .has-dropdown {
    position: relative;
}

.main-nav .has-dropdown > a::after {
    content: '▾';
    margin-left: 5px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.main-nav .has-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.main-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 220px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.main-nav .has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.main-nav .dropdown li {
    padding: 0;
}

.main-nav .dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.main-nav .dropdown a:hover {
    background: rgba(201, 162, 39, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    padding-left: 25px;
}

.main-nav .dropdown a::after {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-light);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-color: #0f172a;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 25px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -1px;
}

.highlight {
    color: var(--accent-color);
    position: relative;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 35px;
    color: rgba(224, 225, 221, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h3 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 15px;
    color: var(--text-light);
    font-weight: 700;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services-section {
    background-color: var(--secondary-color);
}

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

.service-card {
    background: rgba(255,255,255,0.03);
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.service-card .icon {
    font-size: 48px;
    margin-bottom: 25px;
    display: block;
}

.service-card h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-light);
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-10px);
}

/* Why Us / AEO Content */
.why-us-section {
    background-color: var(--primary-color);
}

.split-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.text-content {
    flex: 1;
}

.text-content h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.text-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.benefit-list {
    margin-top: 25px;
}

.benefit-list li {
    margin-bottom: 18px;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
}

.benefit-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.image-content {
    flex: 1;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    display: flex;
    gap: 30px;
    backdrop-filter: blur(10px);
}

.stat {
    text-align: center;
}

.stat .number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.stat .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* FAQ */
.faq-section {
    background-color: var(--secondary-color);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

details {
    background: rgba(255,255,255,0.03);
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: var(--transition);
}

details:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

details[open] {
    border-color: var(--accent-color);
}

summary {
    padding: 22px 25px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    position: relative;
    transition: var(--transition);
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 25px;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

details p {
    padding: 0 25px 25px 25px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    line-height: 1.7;
}

/* Contact */
.contact-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, #1b263b 0%, #0d1b2a 70%);
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
}

.contact-info {
    margin: 30px 0;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

/* Footer */
.main-footer {
    background-color: #050b11;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo h4 {
    font-size: 1.5rem;
    color: white;
}

.footer-links a {
    margin-right: 25px;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
    margin-top: 30px;
}

/* Btn Text */
.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.btn-text:hover {
    color: var(--text-light);
    gap: 12px;
}

/* Floating Buttons Container */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

/* Chat Button */
.chat-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    border: none;
    position: relative;
}

.chat-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: pulse-chat 2s infinite;
    z-index: -1;
}

@keyframes pulse-chat {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
}

.chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.5);
}

.chat-btn svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Scroll to Top Button */
.scroll-top-btn {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    transition: var(--transition);
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.scroll-top-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

/* Old floating button - keep for backwards compatibility */
.floating-chat-btn {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .split-layout {
        flex-direction: column;
    }

    .text-content, .image-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 27, 42, 0.98);
        padding: 20px 0;
        border-bottom: 1px solid var(--glass-border);
        flex-direction: column;
        align-items: center;
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    }

    .main-nav.active {
        display: flex;
        animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        text-align: center;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 18px 20px;
        font-size: 1.1rem;
        color: var(--text-light);
    }

    .main-nav a::after {
        display: none;
    }

    /* Mobile Dropdown */
    .main-nav .has-dropdown > a::after {
        display: inline-block;
        margin-left: 8px;
        transition: transform 0.3s ease;
    }

    .main-nav .has-dropdown.open > a::after {
        transform: rotate(180deg);
    }

    .main-nav .dropdown {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: rgba(0, 0, 0, 0.4);
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: 100%;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: inset 0 5px 15px rgba(0,0,0,0.2);
        display: flex;
        flex-direction: column;
    }

    .main-nav .has-dropdown.open .dropdown {
        max-height: 800px;
    }

    .main-nav .dropdown li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block;
    }

    .main-nav .dropdown li:last-child {
        border-bottom: none;
    }

    .main-nav .dropdown a {
        display: block;
        width: 100%;
        padding: 15px 30px;
        font-size: 0.95rem;
        border-left: 3px solid transparent;
        text-align: left;
        color: rgba(255, 255, 255, 0.9);
        background: transparent;
    }

    .main-nav .dropdown a:hover,
    .main-nav .dropdown a.active {
        padding-left: 35px;
        border-left-color: var(--accent-color);
        background: rgba(201, 162, 39, 0.15);
        color: var(--accent-color);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .glass-card {
        width: 100%;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        display: block;
        margin: 10px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 70px 0;
    }

    .floating-buttons {
        bottom: 20px;
        right: 20px;
    }

    .chat-btn {
        width: 55px;
        height: 55px;
    }

    .scroll-top-btn {
        width: 45px;
        height: 45px;
    }
}

/* Parallax effect for supported browsers */
@supports (background-attachment: fixed) {
    .hero-section {
        background-attachment: fixed;
    }
}

/* Smooth reveal for counters */
.counter {
    display: inline-block;
}

/* Image hover effects */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 12px;
}

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

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-color), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card glow effect on hover */
.card-glow:hover {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.1);
}

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

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2a3a52;
}

/* Selection color */
::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}
