:root {
    --primary-color: #1a237e;
    --secondary-color: #c5cae9;
    --accent-color: #ff4081;
    --text-light: #ffffff;
    --text-dark: #333333;
}

/* Top Bar */
.top-bar {
    font-size: 0.9rem;
}

.top-bar a {
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Main Header */
.main-header {
    background: var(--text-light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
    max-height: 80px;
}

.diocese-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.diocese-motto {
    color: var(--text-dark);
    font-style: italic;
    margin-bottom: 0;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color) !important;
    padding: 1rem 0;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-item {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-image-container {
    position: relative;
    height: 500px; /* Fixed height for desktop */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.carousel-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* Explicitly center both horizontally and vertically */
    max-width: 100%;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
    margin: 0 auto;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(120deg, rgba(26,35,126,0.7) 0%, rgba(255,64,129,0.3) 100%);
    z-index: 1;
    pointer-events: none;
}
.hero-section .carousel-inner,
.hero-section .carousel-indicators,
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    z-index: 2;
}

.modern-caption {
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    background: rgba(26,35,126,0.65);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(26,35,126,0.12);
    padding: 2rem 2.5rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    z-index: 3;
}

/* Mobile Responsiveness for Carousel */
@media (max-width: 768px) {
    .carousel-image-container {
        height: 300px; /* Smaller height for mobile */
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .carousel-image-container {
        height: 250px; /* Even smaller height for very small devices */
    }
    
    .carousel-caption {
        padding: 10px;
        max-width: 90%;
        bottom: 10px;
    }
    
    .carousel-caption h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .carousel-caption .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Welcome Section */
.welcome-section img {
    max-height: 400px;
    object-fit: cover;
}

.quick-links .btn {
    transition: all 0.3s;
}

.quick-links .btn:hover {
    transform: translateY(-2px);
}

.service-times {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* News Section */
.news-section .card {
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.news-section .card:hover {
    transform: translateY(-5px);
}

.news-section .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Events Section */
.event-date {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.event-date .month {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.event-date .day {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

/* Parishes Section */
.parishes-section .card-img-top {
    height: 250px;
    object-fit: cover;
}

/* Call to Action */
.cta-section {
    background: linear-gradient(45deg, var(--primary-color), #283593);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.footer h5 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--secondary-color);
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.bottom-footer {
    background: rgba(0,0,0,0.2);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

.card.shadow-sm.rounded {
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(26,35,126,0.08), 0 1.5px 6px rgba(255,64,129,0.06);
    transition: box-shadow 0.3s, transform 0.3s;
}
.card.shadow-sm.rounded:hover {
    box-shadow: 0 8px 32px rgba(26,35,126,0.14), 0 3px 12px rgba(255,64,129,0.10);
    transform: translateY(-4px) scale(1.02);
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #0d1757;
    border-color: #0d1757;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-accent {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(255,64,129,0.12);
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-accent:hover {
    background: #e91e63;
    color: #fff;
    box-shadow: 0 4px 20px rgba(255,64,129,0.22);
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 2.5px solid var(--secondary-color);
    width: 70px;
    margin: 2.5rem auto;
    opacity: 0.7;
    border-radius: 1px;
}

/* Animate Fade In */
.animate-fadein {
    opacity: 0;
    animation: fadein-up 1s ease-out 0.2s forwards;
}
@keyframes fadein-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .diocese-title {
        font-size: 1.5rem;
    }

    .carousel-item {
        height: 400px;
    }

    .carousel-caption {
        padding: 1rem;
    }

    .welcome-section img {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .main-header {
        text-align: center;
    }

    .logo img {
        max-height: 60px;
        margin-bottom: 1rem;
    }

    .carousel-item {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .event-date {
        padding: 0.5rem;
    }

    .parishes-section .card-img-top {
        height: 200px;
    }

    .modern-caption {
        padding: 1.25rem 0.75rem;
        max-width: 98vw;
    }
    .hero-gradient-overlay {
        background: linear-gradient(120deg, rgba(26,35,126,0.8) 0%, rgba(255,64,129,0.5) 100%);
    }
}

@media (max-width: 576px) {
    .quick-links .btn {
        margin-bottom: 0.5rem;
    }

    .carousel-caption {
        position: relative;
        background: var(--primary-color);
        margin-top: -60px;
    }

    .cta-section .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* SVG icon alignment */
h2 svg {
    vertical-align: middle;
    margin-bottom: 5px;
}

/* Extra spacing for section headers */
h2.text-center {
    letter-spacing: 0.5px;
    font-weight: 700;
}
