/**
 * Sarasavi Branches Website - Custom Styles
 * Based on WordPress/Elementor theme design
 */

/* ========== ROOT VARIABLES ========== */
:root {
    --primary-color: #213448;
    --secondary-color: #547792;
    --accent-color: #94B4C1;
    --light-accent: #ECEFCA;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #213448;
    --light-color: #f3f4f6;
    --white-color: #ffffff;
    --text-color: #374151;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.min-vh-75 {
    min-height: 75vh;
}

/* ========== TOP BAR ========== */
.top-bar {
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.top-bar a {
    color: var(--white-color);
    text-decoration: none;
}

/* ========== NAVIGATION ========== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 100px 0;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
    background-size: cover;
    opacity: 0.3;
}

/* ========== FEATURE BOXES ========== */
.feature-box {
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2) !important;
}

.icon-box i {
    transition: var(--transition);
}

.feature-box:hover .icon-box i {
    transform: scale(1.1);
}

/* ========== BRANCH CARDS & TILES ========== */
.branch-card {
    transition: var(--transition);
    overflow: hidden;
}

.branch-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.branch-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.branch-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Branch Tile Design (Simpler Card Layout) */
.branch-tile {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid #e5e7eb !important;
    background: var(--white-color);
}

.branch-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.branch-tile .card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color);
}

.branch-tile .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.6rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
}

.branch-tile .btn-primary:hover {
    background: var(--secondary-color);
    transform: scale(1.02);
}

.branch-tile a:not(.btn) {
    transition: color 0.2s ease;
}

.branch-tile a:not(.btn):hover {
    color: var(--secondary-color) !important;
}

/* ========== CATEGORY CARDS ========== */
.category-card {
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.category-card .icon-box {
    transition: var(--transition);
}

.category-card:hover .icon-box {
    transform: rotate(10deg) scale(1.1);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: var(--transition);
    text-transform: none;
    letter-spacing: normal;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 119, 146, 0.3);
}

.btn-light {
    background: var(--light-accent);
    color: var(--primary-color);
    border: none;
}

.btn-light:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid var(--white-color);
    color: var(--white-color);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--white-color);
    color: var(--primary-color);
}

/* ========== FORMS ========== */
.form-control {
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* ========== FOOTER ========== */
.footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.footer h5 {
    color: var(--white-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

/* ========== SCROLL TO TOP ========== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white-color);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========== SECTION SPACING ========== */
section {
    position: relative;
}

.section-title {
    margin-bottom: 3rem;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991.98px) {
    .hero-bg {
        padding: 60px 0;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 1rem;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========== UTILITY CLASSES ========== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.rounded-custom {
    border-radius: 1rem;
}

/* ========== LOADING SPINNER ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
