/* CAIASA Portal - Custom Styles */

/* Color Scheme */
:root {
    --caiasa-primary: #005b96;    /* Azul oscuro */
    --caiasa-secondary: #e74c3c;  /* Rojo */
    --caiasa-success: #27ae60;    /* Verde */
    --caiasa-danger: #c0392b;     /* Rojo oscuro */
    --caiasa-light: #f8f9fa;
    --caiasa-dark: #1a1a1a;
    --transition: all 0.3s ease;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Navbar */
.bg-caiasa-dark {
    background: linear-gradient(135deg, var(--caiasa-dark) 0%, #2c3e50 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand span {
    color: white;
    font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--caiasa-primary) 0%, #007bba 50%, #005b96 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 100px 0 !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hero-section .lead {
    font-size: 1.3rem;
    font-weight: 300;
}

.hero-subtitle {
    color: #f2f8ff;
    max-width: 56ch;
    line-height: 1.55;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
}

.hero-description {
    color: #e3eefc;
    font-size: 1.05rem;
    max-width: 62ch;
    line-height: 1.7;
    margin-bottom: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.bg-gradient {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Servicios Section */
.servicios-section {
    background: white;
    padding: 100px 0;
}

.servicios-section h2 {
    color: var(--caiasa-primary);
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.servicios-section > div > p {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* App Cards - Grandes */
.app-card {
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.app-card-lg {
    min-height: 500px;
}

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

.app-icon-lg {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--caiasa-primary), #007bba);
    position: relative;
}

.app-card:nth-child(2) .app-icon-lg {
    background: linear-gradient(135deg, var(--caiasa-success), #16a34a);
}

.app-card:nth-child(3) .app-icon-lg {
    background: linear-gradient(135deg, var(--caiasa-danger), #dc2626);
}

.app-card .card-title {
    color: var(--caiasa-dark);
    font-size: 1.8rem;
    margin-top: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.app-card .card-text {
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
    color: #555;
}

.badge-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-group .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Buttons */
.btn-caiasa-primary,
.btn-caiasa-success,
.btn-caiasa-danger {
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-caiasa-primary::before,
.btn-caiasa-success::before,
.btn-caiasa-danger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-caiasa-primary:hover::before,
.btn-caiasa-success:hover::before,
.btn-caiasa-danger:hover::before {
    width: 300px;
    height: 300px;
}

.btn-caiasa-primary {
    background: linear-gradient(135deg, var(--caiasa-primary), #007bba);
    color: white;
}

.btn-caiasa-primary:hover {
    background: linear-gradient(135deg, #004a7a, #005b96);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 91, 150, 0.3);
}

.btn-caiasa-success {
    background: linear-gradient(135deg, var(--caiasa-success), #16a34a);
    color: white;
}

.btn-caiasa-success:hover {
    background: linear-gradient(135deg, #1e7e34, #27ae60);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(39, 174, 96, 0.3);
}

.btn-caiasa-danger {
    background: linear-gradient(135deg, var(--caiasa-danger), #dc2626);
    color: white;
}

.btn-caiasa-danger:hover {
    background: linear-gradient(135deg, #a02820, #c0392b);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(192, 57, 43, 0.3);
}

.btn-lg {
    padding: 1rem 2.5rem !important;
    font-size: 1.1rem !important;
}

/* Info Section */
.info-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.info-box {
    background: white;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.info-box h5 {
    color: var(--caiasa-dark);
    font-weight: 700;
    font-size: 1.3rem;
}

.info-box i {
    transition: var(--transition);
}

.info-box:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--caiasa-dark) 0%, #2c3e50 100%);
    border-top: 4px solid var(--caiasa-primary);
}

.footer h6 {
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--caiasa-primary) !important;
    text-decoration: underline;
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .servicios-section h2 {
        font-size: 2rem;
    }

    .app-card-lg {
        min-height: auto;
    }

    .app-icon-lg {
        height: 120px;
        font-size: 3rem;
    }

    .app-card .card-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 !important;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .servicios-section {
        padding: 60px 0;
    }

    .servicios-section h2 {
        font-size: 1.6rem;
    }

    .app-card .card-title {
        font-size: 1.3rem;
    }

    .app-card .card-text {
        font-size: 0.95rem;
    }

    .info-section {
        padding: 60px 0;
    }

    .badge-group .badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
}

/* Utility Classes */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7);
}

.bg-white-50 {
    background-color: rgba(255, 255, 255, 0.1);
}

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

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

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

.text-caiasa-primary {
    color: var(--caiasa-primary) !important;
}

.text-caiasa-success {
    color: var(--caiasa-success) !important;
}

.text-caiasa-danger {
    color: var(--caiasa-danger) !important;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* World-Class Redesign Overrides */
:root {
    --caiasa-ink: #0f1f2e;
    --caiasa-surface: #f4f7fb;
    --caiasa-glass: rgba(255, 255, 255, 0.16);
    --caiasa-border: rgba(255, 255, 255, 0.35);
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--caiasa-ink);
    background:
        radial-gradient(circle at 12% -10%, rgba(0, 123, 186, 0.22) 0%, rgba(0, 123, 186, 0) 48%),
        radial-gradient(circle at 90% 14%, rgba(39, 174, 96, 0.2) 0%, rgba(39, 174, 96, 0) 45%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
}

.navbar {
    backdrop-filter: blur(8px);
}

.bg-caiasa-dark {
    background: linear-gradient(120deg, rgba(14, 31, 46, 0.95) 0%, rgba(0, 91, 150, 0.88) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar-brand span {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.25rem;
    letter-spacing: 0.2px;
}

.hero-section {
    background:
        linear-gradient(125deg, #0d3b5f 0%, #005b96 55%, #1f5870 100%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 12px, transparent 12px, transparent 24px);
    padding: 36px 0 28px !important;
}

.hero-section .container {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.hero-copy-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(12, 43, 70, 0.14);
    border-radius: 18px;
    padding: 1.25rem 1.75rem;
    box-shadow: 0 12px 30px rgba(5, 28, 45, 0.18);
    max-width: 100%;
}

.hero-kicker {
    background: rgba(0, 91, 150, 0.1);
    color: #0f3c63;
    border: 1px solid rgba(0, 91, 150, 0.2);
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.hero-section h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.75rem, 2.9vw, 2.5rem);
    line-height: 1.02;
    margin-top: 0.15rem;
    margin-bottom: 0.9rem !important;
    color: #0d2b43;
    text-shadow: none;
}

.hero-subtitle {
    color: #214a69;
    font-weight: 500;
    font-size: 0.97rem;
    margin-bottom: 0.85rem !important;
}

.hero-description {
    color: #35526b;
    font-size: 0.92rem;
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-actions .btn {
    padding: 0.72rem 1.25rem;
    font-size: 0.98rem !important;
}

.btn-outline-hero {
    border: 1px solid rgba(13, 59, 95, 0.35);
    color: #12466f;
    background: rgba(13, 59, 95, 0.05);
}

.btn-outline-hero:hover {
    border-color: rgba(13, 59, 95, 0.55);
    background: rgba(13, 59, 95, 0.1);
    color: #0f3c63;
}

.hero-media-wrap {
    position: relative;
    display: inline-flex;
    padding: 0.65rem;
}

.hero-media-wrap::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.06));
    z-index: 0;
}

.hero-media {
    position: relative;
    z-index: 1;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 24px 48px rgba(8, 18, 28, 0.35);
    transform: rotate(-1.8deg);
    animation: floatCard 7s ease-in-out infinite;
    max-width: 260px;
}

.section-heading h2,
.info-title {
    font-family: 'Fraunces', Georgia, serif;
    letter-spacing: 0.2px;
}

.servicios-section {
    position: relative;
    background: transparent;
}

.app-card {
    border-radius: 20px;
    border: 1px solid rgba(10, 31, 58, 0.08);
    box-shadow: 0 14px 30px rgba(10, 31, 58, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 251, 255, 0.97) 100%);
}

.app-card:hover {
    transform: translateY(-14px);
    box-shadow: 0 24px 45px rgba(10, 31, 58, 0.18) !important;
}

.app-icon-lg {
    position: relative;
    overflow: hidden;
}

.app-icon-lg::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    right: -100px;
    top: -110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.app-card .card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.7rem;
}

.badge-group .badge {
    border-radius: 999px;
    padding: 0.48rem 0.95rem;
}

.info-section {
    background:
        linear-gradient(180deg, rgba(236, 245, 253, 0.65) 0%, rgba(244, 249, 255, 0.95) 100%),
        radial-gradient(circle at 20% 8%, rgba(0, 123, 186, 0.13), transparent 40%);
}

.info-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    letter-spacing: 0.6px;
}

.info-box {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
}

.footer {
    background:
        linear-gradient(130deg, #111f2e 0%, #1a3247 48%, #0f4960 100%);
    border-top: 3px solid rgba(255, 255, 255, 0.15);
}

@keyframes floatCard {
    0%,
    100% {
        transform: rotate(-1.8deg) translateY(0);
    }
    50% {
        transform: rotate(-1.8deg) translateY(-8px);
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 28px 0 22px !important;
    }

    .hero-copy-panel {
        max-width: 100%;
        padding: 1.1rem 1.25rem;
    }

    .hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 22px 0 18px !important;
        text-align: center;
    }

    .hero-copy-panel {
        padding: 1rem 1rem;
        max-width: 100%;
    }

    .hero-kicker {
        font-size: 0.76rem;
    }

    .hero-subtitle {
        font-size: 0.93rem;
    }

    .hero-description {
        font-size: 0.88rem;
    }

    .hero-actions {
        justify-content: center;
        gap: 0.55rem;
    }

    .hero-actions .btn {
        padding: 0.62rem 1rem;
        font-size: 0.9rem !important;
    }

    .hero-media {
        transform: rotate(0deg);
        animation: none;
        max-width: 178px !important;
    }
}