:root {
    --primary: #005599;
    --primary-dark: #003366;
    --primary-light: #2ea3f2;
    --accent: #ff7f00;
    --white: #ffffff;
    --black: #161616;
    --gray-light: #f4f7f6;
    --gray: #666666;
    --text: #333333;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
}

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

ul {
    list-style: none;
}

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

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

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

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

/* Header */
#main-header {
    background-color: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.logo-img {
    height: 45px;
    width: auto;
}

.logo-text {
    line-height: 1;
}

.logo-bgr {
    color: var(--primary-dark);
}

.logo-custodias {
    color: var(--primary);
}

#nav-menu ul {
    display: flex;
    gap: 30px;
}

#nav-menu ul li a {
    font-weight: 600;
}

#nav-menu ul li a:hover {
    color: var(--primary);
}

/* Hero Section */
#hero {
    padding: 120px 0;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.75), rgba(0, 85, 153, 0.55)), url('assets/hero-bg-patrol.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

#hero h1 {
    font-size: 48px;
    color: var(--white);
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#hero .highlight {
    color: var(--primary-light);
}

#hero p {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Services */
#servicios {
    padding: 100px 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.service-card .icon {
    width: 70px;
    height: 70px;
    background-color: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 15px;
    color: var(--gray);
}

/* Cobertura */
#cobertura {
    padding: 100px 0;
    background-color: var(--gray-light);
}

.cobertura-content {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
}

.cobertura-list h3 {
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.cobertura-list ul li {
    margin-bottom: 10px;
    font-weight: 500;
}

.cobertura-list ul li::before {
    content: '✓';
    color: var(--primary);
    margin-right: 10px;
    font-weight: 800;
}

/* Nosotros */
#nosotros {
    padding: 100px 0;
}

.nosotros-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.nosotros-text {
    flex: 1;
    min-width: 300px;
}

.nosotros-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

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

.nosotros-stats {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-width: 300px;
}

.stat-item {
    background-color: var(--primary);
    color: var(--white);
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.stat-item .label {
    font-weight: 600;
    opacity: 0.9;
}

/* Contacto */
#contacto {
    padding: 100px 0;
}

.contacto-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    flex-wrap: wrap;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

#contact-form input,
#contact-form textarea,
.iti {
    width: 100%;
}

#contact-form input,
#contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    /* Ensuring consistent size */
    transition: var(--transition);
}

.iti {
    font-family: var(--font-main);
    display: block !important;
    width: 100%;
}

/* La librería maneja el padding-left automáticamente */
.iti input {
    padding-left: auto;
}

/* Ocultar cualquier texto de lada o accesibilidad que intente aparecer encima del placeholder */
.iti__selected-dial-code,
.iti__sr-only,
.iti__a11y-text {
    display: none !important;
}

.iti__country-list {
    z-index: 1005;
    /* Asegurar que el menú esté arriba */
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 85, 153, 0.1);
}

#contact-form textarea {
    margin-bottom: 20px;
}

.contacto-info {
    background-color: var(--gray-light);
    padding: 40px;
    border-radius: 10px;
}

.contacto-info h3 {
    margin-bottom: 30px;
}

.info-item {
    margin-bottom: 20px;
}

.info-item strong {
    display: block;
    color: var(--primary);
    margin-bottom: 5px;
}

.info-item span {
    display: block;
    color: var(--gray);
}

/* CTA Bar */
#cta-bar {
    padding: 60px 0;
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 30px;
}

/* Footer */
footer {
    padding: 80px 0 20px;
    background-color: var(--black);
    color: var(--white);
}

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

footer h3,
footer h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo h3 {
    margin-bottom: 0;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Make it white for dark footer */
}

.footer-info p {
    opacity: 0.8;
}

.footer-contact p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transition: all 1s ease-out;
}

.reveal.reveal-up {
    transform: translateY(50px);
}

.reveal.reveal-left {
    transform: translateX(-50px);
}

.reveal.reveal-right {
    transform: translateX(50px);
}

.reveal.revealed {
    opacity: 1;
    transform: translate(0) !important;
}

/* Staggered Delay for Grid Items */
.stagger-item:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-item:nth-child(7) {
    transition-delay: 0.7s;
}

.stagger-item:nth-child(8) {
    transition-delay: 0.8s;
}

/* Responsive Design */

/* Tablet & Smaller Desktop (up to 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .nosotros-stats {
        width: 100%;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .mobile-toggle {
        display: flex;
        order: 3;
    }

    #nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 30px 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    #nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }

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

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #nav-menu ul {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .header-cta {
        order: 2;
        margin-left: auto;
        margin-right: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .logo {
        order: 1;
    }

    .logo-img {
        height: 35px;
    }

    .logo a {
        font-size: 18px;
        gap: 8px;
    }

    #hero {
        padding: 100px 0;
    }

    #hero h1 {
        font-size: 32px;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .form-group {
        grid-template-columns: 1fr;
    }

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

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    #hero h1 {
        font-size: 28px;
    }

    .logo-img {
        height: 28px;
    }

    .logo a {
        font-size: 15px;
        gap: 6px;
    }

    .header-cta .btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .stat-item {
        padding: 30px 15px;
    }

    .stat-item .number {
        font-size: 36px;
    }
}

/* Custom Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0, 51, 102, 0.2);
    z-index: 9999;
    display: none;
    max-width: 400px;
    border-left: 5px solid var(--primary);
    overflow: hidden;
}

.toast.active {
    display: block;
    animation: toastSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.toast-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 16px;
    margin-bottom: 4px;
}

.toast-text {
    display: block;
    font-size: 14px;
    color: var(--gray);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.5;
    transition: var(--transition);
}

.toast-close:hover {
    opacity: 1;
}

@media (max-width: 480px) {
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}