/* Custom CSS for SPAI-DT Website */

/* CSS Variables */
:root {
    --navy-primary: #1a365d;
    --navy-secondary: #2c5282;
    --navy-light: #3182ce;
    --navy-lighter: #4299e1;
    --navy-accent: #63b3ed;
    --white: #ffffff;
    --gray-light: #f7fafc;
    --gray-medium: #e2e8f0;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --primary-gradient: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-secondary) 100%);
    --secondary-gradient: linear-gradient(45deg, var(--navy-light), var(--navy-accent));
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.bg-navy {
    background: var(--primary-gradient) !important;
}

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

.text-gradient {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar Styles */
.navbar {
    background: rgba(26, 54, 93, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(26, 54, 93, 1) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--navy-accent) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--navy-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section strong {
    font-weight: 700;
}

.hero-section a {
    color: #ffffff;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.hero-section a:hover {
    color: var(--navy-accent);
    text-decoration: underline;
}

/* SPAI-DT Animated Text */
.spai-dt-animated {
    display: inline-block;
    position: relative;
    min-height: 100px;
    font-size: 1em;
}

.spai-dt-word-container {
    display: inline-block;
    font-size: inherit;
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.3s ease-in;
}

.spai-dt-letter {
    display: inline-block;
    font-weight: 700;
    font-size: inherit;
}

.spai-dt-typing {
    display: inline-block;
    font-weight: 700;
    font-size: inherit;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tagline styling */
#taglineText {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: -10px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><circle cx="200" cy="200" r="50" fill="rgba(255,255,255,0.1)"/><circle cx="800" cy="300" r="80" fill="rgba(255,255,255,0.05)"/><circle cx="400" cy="700" r="60" fill="rgba(255,255,255,0.08)"/><circle cx="600" cy="500" r="40" fill="rgba(255,255,255,0.06)"/></svg>');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-section .btn {
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-primary {
    background: var(--secondary-gradient);
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-10px,0); }
    70% { transform: translate3d(0,-5px,0); }
    90% { transform: translate3d(0,-2px,0); }
}

/* Card Styles */
.card {
    border: none;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Service Cards */
.service-card {
    background: var(--white);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
    border-color: var(--navy-light);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--white);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Journey Slider */
.journey-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.journey-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.journey-card img {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

/* Team Cards */
.team-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--navy-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.team-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--navy-accent);
    transition: all 0.3s ease;
}

.team-card:hover .team-image {
    transform: scale(1.1);
    border-color: var(--navy-primary);
}

.intern-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.intern-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.intern-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--navy-accent);
}

/* Timeline Styles */
.timeline-container {
    position: relative;
}

.timeline-item {
    background: var(--gray-light);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.timeline-item:hover {
    transform: translateY(-5px);
    border-color: var(--navy-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.timeline-item img {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.timeline-year {
    color: var(--navy-primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
}

.timeline-year::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 50px;
    height: 3px;
    background: var(--secondary-gradient);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Progress Bar Animation */
.progress-bar {
    background: var(--secondary-gradient) !important;
    transition: width 0.5s ease;
}

/* Contact Section */
.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

/* QR Code Styling */
.qr-code-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.qr-code-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.qr-code-image {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-code-image:hover {
    transform: scale(1.05);
}

.contact-form {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    background: var(--white);
    box-shadow: 0 0 0 0.2rem rgba(99, 179, 237, 0.25);
    transform: scale(1.02);
}

.contact-form .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Back to Top Button */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-floating.show {
    display: flex;
}

/* Swiper Customization */
.swiper-pagination-bullet {
    background: var(--navy-primary) !important;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--navy-light) !important;
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--navy-primary) !important;
    background: rgba(255, 255, 255, 0.9);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    margin-top: -25px !important;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--white);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: bold;
}

/* Section spacing */
.py-5 {
    padding: 5rem 0 !important;
}

/* Utilities */
.bg-light {
    background-color: var(--gray-light) !important;
}

.text-muted {
    color: var(--text-medium) !important;
}

/* Animation delays for AOS */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Responsive Design */

/* Large tablets and small laptops (992px and down) */
@media (max-width: 991.98px) {
    .hero-section .display-3 {
        font-size: 3rem;
    }
    
    .hero-section .btn {
        margin-bottom: 0.5rem;
    }
    
    .contact-form {
        margin-top: 2rem;
    }
    
    .timeline-item,
    .journey-card,
    .team-card {
        margin-bottom: 2rem;
    }
}

/* Tablets (768px and down) */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
        min-height: 80vh;
    }
    
    .hero-section .display-3 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 0.75rem auto;
    }
    
    .hero-section .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .py-5 {
        padding: 3rem 0 !important;
    }
    
    .display-5 {
        font-size: 2.2rem !important;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .team-image {
        width: 120px;
        height: 120px;
    }
    
    .intern-image {
        width: 80px;
        height: 80px;
    }
    
    .timeline-item {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .journey-card,
    .team-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-floating {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Contact section improvements */
    .contact-item {
        margin-bottom: 1.5rem !important;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .contact-item i,
    .contact-item div[style] {
        margin-right: 1rem !important;
        flex-shrink: 0;
    }
    
    /* Form improvements */
    .contact-form .form-control {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .contact-form .btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Navigation improvements */
    .navbar-brand {
        font-size: 1.75rem !important;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Search form on messages page */
    .card-body .row.g-3 {
        row-gap: 1rem !important;
    }
    
    .card-body .col-md-4,
    .card-body .col-md-3,
    .card-body .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile phones (576px and down) */
@media (max-width: 576px) {
    /* Hero section */
    .hero-section {
        min-height: 70vh;
        padding: 1.5rem 0;
    }
    
    .hero-section .display-3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-section .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        max-width: 260px;
    }
    
    /* Typography */
    .display-5 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .display-6 {
        font-size: 1.5rem !important;
    }
    
    .lead {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Sections */
    .py-5 {
        padding: 2.5rem 0 !important;
    }
    
    /* Cards and components */
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .team-image {
        width: 100px;
        height: 100px;
    }
    
    .intern-image {
        width: 70px;
        height: 70px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Contact section */
    .contact-item {
        margin-bottom: 1.25rem !important;
        padding: 0.75rem 0;
    }
    
    .contact-item h6 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1.5rem !important;
    }
    
    .contact-form h4 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
    }
    
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Messages page specific */
    .card-body .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .card-body .btn-group .btn {
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }
    
    .card-body .btn-group .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Thank you page */
    .success-icon {
        margin-bottom: 1rem;
    }
    
    .success-icon i {
        font-size: 3rem !important;
    }
    
    /* Timeline */
    .timeline-item {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .timeline-year {
        font-size: 1.25rem;
    }

    /* Timeline indicators for mobile */
    .timeline-indicator {
        max-width: 100px;
        min-width: 60px;
    }

    .timeline-indicator small {
        font-size: 0.65rem;
    }

    .timeline-indicator small.fw-bold {
        font-size: 0.6rem;
    }
    
    /* Journey and team cards */
    .journey-card,
    .team-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    /* Badges and small elements */
    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Float button */
    .btn-floating {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
    
    /* Swiper improvements */
    .swiper-button-next,
    .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
        margin-top: -17.5px !important;
    }
    
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Hero badges */
    .hero-section .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.25rem;
    }
    
    /* QR Code responsive */
    .qr-code-card {
        margin: 1rem 0.5rem;
    }
    
    .qr-code-image {
        max-width: 150px !important;
    }
}

/* Extra small phones (480px and down) */
@media (max-width: 480px) {
    .hero-section .display-3 {
        font-size: 1.6rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .contact-form {
        padding: 1rem !important;
        margin: 1rem;
    }
    
    .card {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section .display-3 {
        font-size: 2rem;
    }
    
    .py-5 {
        padding: 2rem 0 !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .animate-bounce,
    .hover-lift,
    .service-card,
    .timeline-item,
    .journey-card,
    .team-card {
        animation: none !important;
        transition: none !important;
    }
    
    .hero-background {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000 !important;
    }
    
    .btn-outline-secondary,
    .btn-outline-primary,
    .btn-outline-danger {
        border-width: 2px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    .card {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn-floating,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination,
    .contact-form,
    .btn {
        display: none !important;
    }
    
    .hero-section,
    .py-5 {
        padding: 1rem 0 !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .card,
    .timeline-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Custom Badge Styles */
.badge {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

/* Form Validation Styles */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #28a745;
}

/* Timeline Indicator Styles */
.timeline-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 150px;
    min-width: 80px;
}

.timeline-indicator:hover .indicator-dot {
    transform: scale(1.1);
    background-color: var(--primary-color);
}

.indicator-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #dee2e6;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-indicator.active .indicator-dot {
    background-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.timeline-indicator.active small {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.timeline-indicator small {
    display: block;
    font-size: 0.75rem;
    line-height: 1.2;
}

.timeline-indicator small.fw-bold {
    font-size: 0.7rem;
    margin-top: 2px;
    color: var(--navy-secondary);
}

/* Timeline Slide Content */
.timeline-slide-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stacked Images Container */
.stacked-images-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto 2rem;
    perspective: 1000px;
}

.stacked-image {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stacked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.6s ease;
}

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

/* Back image - tilted and positioned behind */
.stacked-image.back {
    transform: rotate(-5deg) translateY(10px) translateX(-15px) scale(0.95);
    z-index: 1;
    opacity: 0.85;
}

/* Front image - straight and on top */
.stacked-image.front {
    transform: rotate(2deg) translateY(-10px) translateX(10px) scale(1);
    z-index: 2;
}

/* When images are swapping */
.stacked-image.swapping-to-front {
    transform: rotate(2deg) translateY(-10px) translateX(10px) scale(1);
    z-index: 3;
    opacity: 1;
}

.stacked-image.swapping-to-back {
    transform: rotate(-5deg) translateY(10px) translateX(-15px) scale(0.95);
    z-index: 1;
    opacity: 0.85;
}

/* Hover effects for stacked images */
.stacked-image.back:hover {
    opacity: 1;
    transform: rotate(-5deg) translateY(5px) translateX(-15px) scale(0.97);
}

.stacked-image.front:hover {
    transform: rotate(2deg) translateY(-15px) translateX(10px) scale(1.02);
}

/* Original single image fallback */
.timeline-slide-content img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Responsive adjustments for stacked images */
@media (max-width: 768px) {
    .stacked-images-container {
        max-width: 350px;
        height: 220px;
    }

    .stacked-image.back {
        transform: rotate(-4deg) translateY(8px) translateX(-10px) scale(0.95);
    }

    .stacked-image.front {
        transform: rotate(1deg) translateY(-8px) translateX(8px) scale(1);
    }
}

@media (max-width: 480px) {
    .stacked-images-container {
        max-width: 280px;
        height: 180px;
    }

    .stacked-image.back {
        transform: rotate(-3deg) translateY(6px) translateX(-8px) scale(0.95);
    }

    .stacked-image.front {
        transform: rotate(1deg) translateY(-6px) translateX(6px) scale(1);
    }
}

.timeline-slide-content h3 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.timeline-slide-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: justify;
}

.timeline-slide-content p strong {
    font-weight: 700;
    color: var(--navy-primary);
}

/* Print Styles */
@media print {
    .navbar,
    .btn-floating,
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-pagination {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .py-5 {
        padding: 2rem 0 !important;
    }
}