/*
 * Main Theme Styles for St. Francis Theme
 * Inspired by lucknowloreto.com
 */

:root {
    /* Color Palette */
    --color-primary: #2c3e50; /* Dark Blue */
    --color-secondary: #85c1e9; /* Sky Blue */
    --color-accent: #e67e22; /* Vibrant Orange */
    --color-text-dark: #333333;
    --color-text-light: #ffffff;
    --color-bg-light: #f9f9f9;
    --color-border: #dddddd;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Layout */
    --border-radius-large: 30px;
    --border-radius-pill: 50px;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--color-bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
    color: var(--color-text-light);
}

.btn:hover::before {
    width: 100%;
}

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

.text-center {
    text-align: center;
}

/* Header Styles */
.site-header {
    background-color: var(--color-text-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-dark {
    background-color: #222d3a;
    color: #ffffff;
    padding: 10px 0;
    font-size: 13px;
}

.top-bar-dark a {
    color: #ffffff;
    transition: all 0.3s ease;
}

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

.notifications-btn:hover {
    background-color: #e68a00 !important;
}

.main-navigation-wrapper {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-navigation-wrapper .container {
    display: flex;
    justify-content: flex-start; /* Align menu to the left */
    align-items: center;
}

.site-branding .site-title {
    margin: 0;
    font-size: 24px;
    color: var(--color-primary);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    color: #333333;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 20px 10px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-navigation ul li.nav-home-btn a {
    background-color: #4caf50;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 18px;
}

.main-navigation ul li.nav-home-btn a:hover {
    background-color: #3d8b40;
}

/* Caret for top-level items with children */
.main-navigation > ul > li.menu-item-has-children > a::after {
    content: '\f107'; /* FontAwesome angle-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.main-navigation > ul > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.main-navigation ul li a:hover {
    color: var(--color-accent);
}

/* Dropdown Sub-menu Styles */
.main-navigation ul ul.sub-menu {
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1f2937; /* Slightly richer dark slate */
    min-width: 260px; /* Slightly wider */
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid #e67e22; /* Orange accent top border */
    z-index: 1000;
    flex-direction: column;
    display: flex;
    align-items: stretch; /* Override parent ul's align-items: center */
    padding: 10px 0; /* Breathing room top and bottom */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-navigation ul li:hover > ul.sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.main-navigation ul ul.sub-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.main-navigation ul ul.sub-menu li:last-child {
    border-bottom: none;
}

.main-navigation ul ul.sub-menu li a {
    padding: 12px 20px; /* Base padding */
    font-size: 13.5px;
    font-weight: 500;
    color: #f3f4f6; /* Off-white for softer contrast */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-align: left;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    position: relative;
}

/* Re-introducing the sleek hover arrow */
.main-navigation ul ul.sub-menu li a::before {
    content: '\f105'; /* FontAwesome angle-right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #e67e22;
}

.main-navigation ul ul.sub-menu li a:hover {
    color: #e67e22;
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 35px; /* Shift text right on hover */
}

.main-navigation ul ul.sub-menu li a:hover::before {
    opacity: 1;
    transform: translateX(0); /* Slide arrow in */
}

/* Dynamic Hero Carousel */
.hero-carousel {
    position: relative;
    overflow: hidden;
    height: 70vh;
    min-height: 400px;
    background-color: var(--color-secondary);
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-text-light);
    transform: translateY(20px);
    transition: transform 0.8s ease;
}

.carousel-item.active .hero-content {
    transform: translateY(0);
}

.hero-content h1 {
    font-size: 48px;
    color: var(--color-text-light);
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.slide-content {
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: var(--color-accent);
}

.carousel-control.prev { left: 20px; }
.carousel-control.next { right: 20px; }

/* Notice Board */
.notice-board {
    background-color: var(--color-bg-light);
}

.notice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.notice-card {
    background: var(--color-bg-light);
    border-left: 5px solid var(--color-accent);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.notice-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.notice-card h3 {
    margin-top: 0;
    font-size: 18px;
}

.notice-card h3 a {
    color: var(--color-text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.notice-card:hover h3 a {
    color: var(--color-accent);
}

.notice-card .date {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    display: block;
}

/* Messages Section */
.messages-section {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.messages-section h2 {
    color: var(--color-text-light);
}

.messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.message-card {
    background-color: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: var(--border-radius-large);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.15) !important;
}

.message-card img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid var(--color-secondary);
    transition: transform 0.5s ease;
}

.message-card:hover img {
    transform: scale(1.05) rotate(2deg);
}

.message-content h3 {
    color: var(--color-accent);
    margin-top: 0;
}

/* Achievements Section */
.achievements-section {
    background-color: var(--color-text-light);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.achievement-card {
    text-align: center;
    transition: transform 0.3s ease;
}

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

.achievement-card img {
    border-radius: 50%;
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 5px solid var(--color-primary);
    margin-bottom: 15px;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.achievement-card:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.5);
    border-color: var(--color-accent) !important;
}

.achievement-card h3 {
    margin: 10px 0 5px;
    font-size: 18px;
}

.achievement-card p {
    color: var(--color-accent);
    font-weight: bold;
    margin: 0;
}

/* Gallery Snippet */
.gallery-section {
    background-color: var(--color-bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    border-radius: var(--border-radius-large);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '\f00e'; /* FontAwesome search-plus */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 32px;
    z-index: 2;
    transition: transform 0.3s ease;
    opacity: 0;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.6);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Footer Styles */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 60px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--color-accent);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-secondary);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: var(--color-text-light);
    opacity: 0.8;
}

.footer-widget ul li a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.site-info {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 14px;
    opacity: 0.7;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--color-accent);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .main-navigation ul {
        display: none; /* In a real scenario, implement a hamburger menu */
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .message-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Loreto Inner Page Layout */
.loreto-page-banner {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-primary);
    display: flex;
    align-items: flex-end;
}

.loreto-banner-title {
    background-color: var(--color-accent);
    color: var(--color-text-light);
    padding: 15px 40px;
    font-size: 28px;
    margin: 0 0 -25px 10%; /* Overlap effect */
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: inline-block;
    text-transform: uppercase;
}

.loreto-breadcrumbs {
    padding: 40px 10% 10px;
    font-size: 14px;
    color: #777;
    background: var(--color-bg-light);
}

.loreto-breadcrumbs a {
    color: var(--color-primary);
}

.loreto-inner-layout {
    display: grid;
    grid-template-columns: 25% 75%;
    gap: 40px;
    padding: 30px 10% 80px;
    background: var(--color-bg-light);
}

.loreto-sidebar {
    background: var(--color-text-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 4px solid var(--color-secondary);
    align-self: start;
}

.loreto-sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
}

.loreto-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loreto-sidebar ul li {
    border-bottom: 1px dashed var(--color-border);
}

.loreto-sidebar ul li:last-child {
    border-bottom: none;
}

.loreto-sidebar ul li a {
    display: block;
    padding: 12px 5px;
    color: var(--color-text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.loreto-sidebar ul li a:hover,
.loreto-sidebar ul li.active a {
    color: var(--color-accent);
    padding-left: 15px;
}

.loreto-sidebar ul li a i {
    margin-right: 10px;
    color: var(--color-secondary);
}

.loreto-main-content {
    background: var(--color-text-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.loreto-main-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.loreto-main-content h2, 
.loreto-main-content h3 {
    color: var(--color-primary);
    margin-top: 30px;
}

@media (max-width: 992px) {
    .loreto-inner-layout {
        grid-template-columns: 1fr;
    }
    .loreto-banner-title {
        margin-left: 5%;
        font-size: 22px;
    }
}

/* Contact Page Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--color-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Job Openings */
.job-card {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed var(--color-accent);
}

/* Office Bearers Grid */
.office-bearer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.bearer-card {
    background: var(--color-bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.bearer-card img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid var(--color-secondary);
    margin-bottom: 15px;
}

.bearer-card h4 {
    margin: 0 0 5px 0;
    color: var(--color-primary);
}

.bearer-card p {
    margin: 0;
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 600;
}
