/* Custom Styles for Jothi Trust Website */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Root Variables */
:root {
  --primary-color: #2c5aa0;
  --secondary-color: #f39c12;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --gradient-primary: linear-gradient(135deg, #0e1c9b 0%, #4b54a2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-medium: 0 5px 25px rgba(0,0,0,0.15);
  --shadow-heavy: 0 10px 40px rgba(0,0,0,0.2);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Typography */
body {
  font-family: 'Merriweather', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--dark-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.8rem; font-weight: 600; }
h3 { font-size: 2.2rem; font-weight: 600; }
h4 { font-size: 1.8rem; font-weight: 500; }
h5 { font-size: 1.4rem; font-weight: 500; }
h6 { font-size: 1.2rem; font-weight: 500; }

/* Responsive Typography */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.8rem; }
}

/* Enhanced Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.8rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--dark-color) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: -1;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  left: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Animated Buttons */
.btn {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.75rem 2rem;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
  background: var(--gradient-secondary);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
}

.btn-success {
  background: var(--gradient-success);
  color: white;
}

/* Animated Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.card-header {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1.5rem;
}

.card-body {
  padding: 2rem;
}

/* Page Headers with Animation */
.page-header {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0.8;
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Slide In Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

/* Pulse Animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Enhanced Forms */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
  transform: translateY(-2px);
}

/* Contact Info Boxes */
.contact-info-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.contact-info-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  background: var(--gradient-primary);
  color: white;
}

.contact-info-box i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.contact-info-box:hover i {
  color: white;
  transform: scale(1.2);
}

/* Loading Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Footer */
.footer {
  background: var(--gradient-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer h5 {
  color: white;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: white;
  transform: translateX(5px);
}

/* Breadcrumb Enhancement */
.breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: white;
}

/* Icon Animations */
.icon-hover {
  transition: var(--transition);
}

.icon-hover:hover {
  transform: rotate(360deg) scale(1.2);
  color: var(--secondary-color);
}

/* Text Animations */
.typewriter {
  overflow: hidden;
  border-right: 0.15em solid var(--primary-color);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.4rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .contact-info-box {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
}

/* Utility Classes */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bg-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-scale {
  transition: var(--transition);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.border-gradient {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box, var(--gradient-primary) border-box;
}

/* Print Styles */
@media print {
  .navbar, .footer, .btn {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}