/* Color Variables */
:root {
    --navy-dark-blue: #00146d;
    --gold: #FFD700;
    --white: #FFFFFF;
    --black: #000000;
    --off-white: #F8F9FA;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: var(--black);
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Clash Display', sans-serif;
    color: var(--navy-dark-blue);
}

/* Global Styles */
.btn-primary {
    background-color: var(--gold);
    color: var(--navy-dark-blue);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--navy-dark-blue);
    color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--navy-dark-blue);
    color: var(--navy-dark-blue);
}

.btn-secondary:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--navy-dark-blue);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: 
        linear-gradient(125deg, 
            var(--navy-dark-blue) 0%,
            #2A3F66 30%,
            #1A2A44 70%,
            #0F1829 100%
        );
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 150%, rgba(255, 215, 0, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% -50%, rgba(255, 215, 0, 0.35) 0%, transparent 50%),
        linear-gradient(60deg, 
            rgba(255, 215, 0, 0.2) 0%, 
            rgba(255, 215, 0, 0) 30%,
            rgba(248, 249, 250, 0.1) 70%,
            rgba(248, 249, 250, 0.2) 100%
        );
    animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        opacity: 0.7;
        transform: scale(1.1) rotate(-2deg);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.15) rotate(0deg);
    }
    100% {
        opacity: 0.7;
        transform: scale(1.1) rotate(2deg);
    }
}

/* Navigation */
.navbar {
    background-color: var(--navy-dark-blue);
    padding: 0.5rem 0;
    height: 80px;
}

.navbar-brand {
    color: var(--gold);
    font-family: 'Clash Display', sans-serif;
    font-weight: 700;
}

.nav-link {
    color: var(--white);
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Animations and Effects */
.animate-title {
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    background: linear-gradient(to right, var(--white) 20%, var(--off-white) 40%, var(--gold) 60%, var(--white) 80%);
    background-size: 200% auto;
    color: var(--white);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

.animate-text {
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.animate-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.animate-btn .btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 215, 0, 0.2) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: btnShine 3s infinite;
}

.animate-btn-outline {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.animate-btn-outline .btn-border {
    position: absolute;
    inset: 0;
    border: 2px solid var(--gold);
    opacity: 0;
    animation: borderPulse 2s infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Animated Shapes */
.shapes-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    border: 4px solid rgba(255, 255, 255, 0.6);
    transform: rotate(45deg);
    animation: shapeFloat 6s ease-in-out infinite, shapeRotate 15s linear infinite, shapeGlow 4s ease-in-out infinite alternate;
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.5),
        0 0 60px rgba(255, 255, 255, 0.3),
        0 0 90px rgba(255, 255, 255, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

.shape-2 {
    top: 60%;
    right: 15%;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.4);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: shapeFloat 5s ease-in-out infinite alternate, 
              shapeGlow 3s ease-in-out infinite alternate,
              shapeRotate 20s linear infinite;
    filter: blur(1.5px);
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(255, 255, 255, 0.2);
}

.shape-3 {
    bottom: 15%;
    left: 20%;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    transform: rotate(30deg);
    animation: shapeFloat 7s ease-in-out infinite, 
              shapeRotate 12s linear infinite reverse,
              shapeGlow 5s ease-in-out infinite;
    box-shadow: 
        0 0 35px rgba(255, 255, 255, 0.5),
        0 0 70px rgba(255, 255, 255, 0.3),
        0 0 100px rgba(255, 255, 255, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.4);
}

.shape-4 {
    top: 30%;
    right: 30%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.35);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: shapeFloat 8s ease-in-out infinite alternate, 
              shapeRotate 18s linear infinite, 
              shapeGlow 4s ease-in-out infinite alternate;
    filter: blur(1px);
    box-shadow: 
        0 0 50px rgba(255, 255, 255, 0.4),
        0 0 100px rgba(255, 255, 255, 0.2);
}

.shape-circle {
    top: 45%;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: shapePulse 3s ease-in-out infinite;
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(255, 255, 255, 0.3),
        0 0 120px rgba(255, 255, 255, 0.2),
        inset 0 0 60px rgba(255, 255, 255, 0.2);
}

.shape-ring {
    top: 50%;
    left: 45%;
    width: 100px;
    height: 100px;
    border: 12px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: shapeRing 6s linear infinite, shapeGlow 4s ease-in-out infinite alternate;
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.5),
        0 0 80px rgba(255, 255, 255, 0.3),
        0 0 120px rgba(255, 255, 255, 0.2);
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

@keyframes shapeRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shapePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

@keyframes shapeRing {
    0% {
        transform: rotate(0) scale(1);
        opacity: 0.4;
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 0.5),
            0 0 80px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: rotate(180deg) scale(1.3);
        opacity: 0.7;
        box-shadow: 
            0 0 60px rgba(255, 255, 255, 0.6),
            0 0 120px rgba(255, 255, 255, 0.4);
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.4;
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 0.5),
            0 0 80px rgba(255, 255, 255, 0.3);
    }
}

@keyframes shapeGlow {
    0% {
        filter: blur(1px);
        opacity: 0.4;
        box-shadow: 
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 60px rgba(255, 255, 255, 0.2);
    }
    50% {
        filter: blur(3px);
        opacity: 0.7;
        box-shadow: 
            0 0 50px rgba(255, 255, 255, 0.6),
            0 0 100px rgba(255, 255, 255, 0.3);
    }
    100% {
        filter: blur(1px);
        opacity: 0.4;
        box-shadow: 
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 60px rgba(255, 255, 255, 0.2);
    }
}

@keyframes shapePulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.4;
        box-shadow: 
            0 0 40px rgba(255, 255, 255, 0.4),
            0 0 80px rgba(255, 255, 255, 0.2),
            0 0 120px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.3) rotate(5deg);
        opacity: 0.7;
        box-shadow: 
            0 0 60px rgba(255, 255, 255, 0.6),
            0 0 120px rgba(255, 255, 255, 0.3),
            0 0 180px rgba(255, 255, 255, 0.2);
    }
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(15px) rotate(-5deg);
    }
}

/* Hero Animation Keyframes */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btnShine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes borderPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Cards */
.service-card {
    background: var(--white);
    border: 1px solid rgba(26, 42, 68, 0.1);
    transition: all 0.3s ease;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(26, 42, 68, 0.1);
}

/* Ensure the card body grows and the button stays aligned at the bottom */
.service-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.service-card .card-body .btn {
    margin-top: auto;
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Footer */
.footer {
    background-color: var(--navy-dark-blue);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-title {
    color: var(--gold);
    font-family: 'Clash Display', sans-serif;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: var(--gold);
}

/* Trust Badges */
.trust-badge {
    text-align: center;
    margin: 2rem 0;
}

.trust-badge-circle {
    width: 120px;
    height: 120px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* News Section */
.news-section {
    background-color: var(--off-white);
}

.news-card {
    transition: all 0.3s ease;
    background: var(--white);
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(26, 42, 68, 0.1);
}

.news-card .card-img-overlay-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

.news-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 42, 68, 0) 0%, rgba(26, 42, 68, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .overlay {
    opacity: 0.2;
}

.news-card .badge {
    background-color: var(--gold) !important;
    color: var(--navy-dark-blue);
    font-weight: 500;
    padding: 0.5em 1em;
}

.news-card .card-title {
    color: var(--navy-dark-blue);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.news-card .card-text {
    color: var(--black);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.news-card .btn-link {
    color: var(--navy-dark-blue);
    text-decoration: none;
    font-weight: 500;
    padding: 0;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.news-card .btn-link:hover {
    color: var(--gold);
}

.news-card .btn-link .fas {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.news-card .btn-link:hover .fas {
    transform: translateX(5px);
}

/* Make news card bodies stretch and push the Read More link to the bottom */
.news-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.news-card .card-body .btn-link {
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding-top: calc(80px + 2rem); /* navbar height + additional padding */
        padding-bottom: 2rem;
        overflow-x: hidden;
    }
    
    .navbar-collapse {
        background-color: var(--navy-dark-blue);
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        padding: 1rem;
    }

    .hero .row {
        text-align: center;
    }

    .hero-content {
        padding: 0 1rem;
        margin-top: 1rem;
    }

    .hero .display-4 {
        font-size: calc(1.8rem + 1.5vw);
        line-height: 1.3;
        margin-top: 1rem;
    }

    .hero .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem !important;
    }

    .hero .d-flex.gap-3 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem !important;
    }

    .hero .btn {
        min-width: 200px;
        margin: 0.5rem;
    }

    .hero-image-wrapper {
        max-width: 280px;
        margin: -1rem auto 0;
        padding: 1rem;
        position: relative;
        z-index: 1;
    }

    .hero-image-wrapper img {
        max-width: 100%;
        height: auto;
        max-height: 220px;
        object-fit: contain;
        margin-top: 1rem;
    }

    /* Improve shape positioning and sizing for mobile */
    .shapes-container {
        transform: scale(0.7);
    }

    .shape-1 {
        width: 60px;
        height: 60px;
    }

    .shape-2 {
        width: 45px;
        height: 45px;
    }

    .shape-3 {
        width: 35px;
        height: 35px;
    }

    .shape-4 {
        width: 50px;
        height: 50px;
    }

    .shape-circle {
        width: 90px;
        height: 90px;
    }

    .shape-ring {
        width: 70px;
        height: 70px;
        border-width: 8px;
    }

    /* Adjust animations for better performance on mobile */
    .shape {
        animation-duration: 4s;
        opacity: 0.15;
    }

    .news-card .card-img-overlay-wrap {
        height: 180px;
    }
}

/* Additional optimizations for very small screens */
@media (max-width: 576px) {
    .hero {
        min-height: 100vh;
        padding-top: calc(80px + 1rem); /* navbar height + smaller padding */
        padding-bottom: 2rem;
    }

    .shapes-container {
        transform: scale(0.6);
        opacity: 0.5;
    }

    .hero .display-4 {
        font-size: calc(1.5rem + 1.2vw);
        margin-top: 0.5rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .hero-image-wrapper {
        max-width: 200px;
        margin: -0.5rem auto 0;
    }

    .hero-image-wrapper img {
        max-height: 160px;
        margin-top: 0.5rem;
    }

    .hero .btn {
        min-width: 160px;
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

    /* Further reduce shape sizes */
    .shape-1 { width: 50px; height: 50px; }
    .shape-2 { width: 35px; height: 35px; }
    .shape-3 { width: 30px; height: 30px; }
    .shape-4 { width: 40px; height: 40px; }
    .shape-circle { width: 80px; height: 80px; }
    .shape-ring { 
        width: 60px; 
        height: 60px;
        border-width: 6px;
    }

    /* Optimize animations for small screens */
    .shape {
        animation-duration: 3s;
    }

    @keyframes shapeFloat {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
        }
        50% {
            transform: translateY(-10px) rotate(5deg);
        }
    }

    .hero .d-flex.gap-3 {
        flex-direction: column;
        align-items: center;
    }

    .hero .btn {
        margin: 0.5rem 0;
        width: 100%;
        max-width: 280px;
    }
}
