/* Custom Styles for Adarsh Vidyapeeth Website */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&display=swap');

/* Root Variables */
:root {
    --primary-orange: #FF8C00;
    --primary-blue: #003D82;
    --accent-yellow: #FFD700;
    --success-green: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --background: #FAFAFA;
}

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

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

/* Devanagari Font for Hindi Text */
.font-devanagari {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff7700;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Apply Animations on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #ff7700;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 140, 0, 0.3);
}

/* Back to Top Button */
#back-to-top {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

/* Gallery Filter */
.gallery-filter-btn.active {
    background-color: var(--primary-orange);
    color: white;
}

/* Gallery Items */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.hidden {
    display: none;
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    font-family: 'Poppins', sans-serif;
}

input:focus,
textarea:focus {
    border-color: var(--primary-orange);
    outline: none;
}

/* Custom Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hover Effects for Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-orange), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Responsive Image */
img {
    max-width: 100%;
    height: auto;
}

/* Print Styles */
@media print {
    #navbar,
    footer,
    .sticky-bottom-bar,
    #back-to-top {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus {
    outline: 3px solid var(--primary-orange);
    outline-offset: 2px;
}

/* Disable outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Custom Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Increase touch target sizes for mobile */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Adjust padding for mobile */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Desktop Large Screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
}

/* Dark Mode Support (Optional for Future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in Phase 2 */
}

/* Performance Optimization */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Aspect Ratio Boxes (for images) */
.aspect-ratio-box {
    position: relative;
    overflow: hidden;
}

.aspect-ratio-box::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.aspect-ratio-box > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* WhatsApp Float Button (Optional) */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 100;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 90px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}
