:root {
    --primary-color: #0d1042;
    --secondary-color: #141852;
    --accent-color: #FF3D00;
    --text-light: #ffffff;
    --text-dark: #333333;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    background: linear-gradient(-45deg, #0d1042, #141852, #c62828, #b71c1c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: rgba(255,255,255,0.8);
}

/* Navigation Submenu */
.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item > a::after {
    content: '▼';
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

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

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(-45deg, #0d1042, #141852);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    list-style: none;
    z-index: 1000;
}

.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 0.5rem 1rem;
}

.submenu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
}

.hamburger-menu {
    cursor: pointer;
    padding: 10px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: 0.4s;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: block;
        z-index: 1001;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    body.menu-open {
        overflow: hidden;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(-45deg, #0d1042, #141852);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        transition: 0.5s ease-in-out;
        z-index: 1000;
        padding-top: 80px;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item > a {
        justify-content: space-between;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Reset desktop submenu styles for mobile */
    .submenu {
        display: block !important;
        position: static !important;
        background: rgba(255, 255, 255, 0.05) !important;
        width: 100% !important;
        max-height: 0;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: max-height 0.3s ease !important;
        overflow: hidden;
        box-shadow: none;
        padding: 0;
    }

    .nav-item.active .submenu {
        max-height: 500px;
    }

    .submenu li {
        padding: 0;
    }

    .submenu a {
        padding: 0.75rem 3rem;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        display: block;
        width: 100%;
    }

    .submenu a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-item > a::after {
        content: '+';
        font-size: 1.2rem;
    }

    .nav-item.active > a::after {
        content: '-';
    }

    /* CTA Button in mobile */
    .nav-links li:last-child {
        margin-top: 1rem;
        border-bottom: none;
    }

    .nav-links .cta-button {
        margin: 1rem 2rem;
        width: calc(100% - 4rem);
    }

    /* Ensure hamburger menu stays on top */
    .hamburger-menu {
        position: fixed;
        top: 20px;
        right: 20px;
    }
}

/* Slider Section */
.slider-section {
    margin-top: 82px; /* Adjust this value based on your header height */
    background-color: #fff;
}

.slider-section h2 {
    display: none; /* Remove the heading since it's now a hero slider */
}

.slider-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
    height: 60vh; /* Reduced from 80vh to 60vh */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0.98));
    color: var(--text-light);
}

.slide-content h3 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 1.2rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-button:hover {
    background-color: var(--primary-color);
}

.slider-button:hover i {
    color: white;
}

.slider-button.prev {
    left: 20px;
}

.slider-button.next {
    right: 20px;
}

.slider-button i {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .slider-section {
        margin-top: 60px; /* Adjust for smaller header on mobile */
    }

    .slide {
        height: 45vh; /* Reduced from 60vh to 45vh for mobile */
    }
    
    .slide-content {
        padding: 2rem;
    }

    .slide-content h3 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }
    
    .slider-button {
        width: 40px;
        height: 40px;
    }
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: rgba(255,255,255,0.15);
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}

/* Family Section */
.family-section {
    padding: 5rem 5%;
    background-color: #f5f5f5;
}

.family-content {
    max-width: 1400px;
    margin: 0 auto;
}

.family-content h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.family-content h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.family-content p {
    max-width: 800px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    line-height: 1.2;
}

.news-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.news-date .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.news-content {
    padding: 1.5rem;
}

.news-content h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.news-content p {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--secondary-color);
}

.news-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .news-image {
        height: 180px;
    }
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 3rem 5%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-light);
    text-decoration: none;
}

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