/*
  File: style.css
  Description: Custom styles for the 'Cursos de Inglés en Colombia' website.
  Complements Tailwind CSS with a Modern design system, hyperrealistic textures, and morphing animations.
*/

/* ---------------------------------- */
/*      1. CSS Variables & Setup      */
/* ---------------------------------- */

:root {
  /* Color Scheme: Complementary (Deep Blue & Vibrant Orange) */
  --primary-color: #0d47a1;  /* Deep Blue */
  --secondary-color: #1565c0; /* Lighter Blue */
  --accent-color: #ff6f00;   /* Vibrant Orange */
  --accent-color-dark: #e65100; /* Darker Orange for hover */
  
  /* Text & Background Colors */
  --text-dark: #212529;
  --text-light: #f8f9fa;
  --text-muted: #6c757d;
  --bg-light: #f8f9fa;
  --bg-dark: #263238; /* For dark sections like footer */
  --bg-white: #ffffff;
  --border-color: #dee2e6;

  /* Typography */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Nunito', sans-serif;

  /* Transitions & Animations */
  --transition-speed-fast: 0.2s;
  --transition-speed-normal: 0.3s;
  --transition-speed-slow: 0.5s;
}

/* ---------------------------------- */
/*          2. Global Styles          */
/* ---------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 1px;
}

.section-title {
  color: var(--text-dark);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-speed-normal) ease-in-out;
}

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

/* Background image utility */
.bg-image-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay for text on background images */
.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

/* Ensure content is above overlay */
.bg-overlay > * {
    position: relative;
    z-index: 2;
}


/* ---------------------------------- */
/*     3. Reusable Components         */
/* ---------------------------------- */

/* --- Global Button Styles --- */
.btn-primary, button[type="submit"] {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-light);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-speed-normal) ease-in-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  letter-spacing: 1.5px;
}

.btn-primary:hover, button[type="submit"]:hover {
  background-color: var(--accent-color-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 111, 0, 0.3);
}

/* --- Card Styles (Success Stories, Blog, etc.) --- */
.card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed-normal) ease, box-shadow var(--transition-speed-normal) ease;
  display: flex;
  flex-direction: column;
  text-align: center; /* Center text content */
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.card .card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistent card image sizes */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the area without distortion */
  transition: transform var(--transition-speed-slow) ease;
}

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

.card .card-content {
  padding: 24px;
  flex-grow: 1; /* Allows content to fill space */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card .card-content a {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: auto; /* Pushes the link to the bottom */
}

/* --- Accordion (Case Studies) --- */
.accordion-header {
  transition: background-color var(--transition-speed-normal);
}

.accordion-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-speed-slow) ease-in-out;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-item.active .accordion-content {
  max-height: 500px; /* Adjust as needed */
  padding-top: 0;
  padding-bottom: 24px;
}

/* --- Form Styles --- */
#contact-form input,
#contact-form textarea {
    font-family: var(--font-body);
    border: 1px solid var(--border-color);
    transition: border-color var(--transition-speed-normal), box-shadow var(--transition-speed-normal);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.2);
}


/* ---------------------------------- */
/*       4. Section-Specific          */
/* ---------------------------------- */

/* --- Hero Section --- */
#hero h1 {
  color: var(--text-light); /* Enforce white color for hero title */
}

/* --- Header & Navigation --- */
header {
  transition: box-shadow var(--transition-speed-normal);
}

/* --- Vision Section --- */
#vision .image-container {
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.3);
}

#vision:hover .image-container {
    transform: perspective(1000px) rotateY(0deg);
}

/* --- Resources Section --- */
.resource-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.resource-card h3 a {
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
  background-color: var(--bg-dark);
}

footer h4 {
  color: var(--text-light);
}

footer a {
  color: #adb5bd; /* Muted light gray */
  transition: color var(--transition-speed-normal);
}

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

/* Footer social media links are text-based as requested */
footer .flex.justify-center a {
  padding: 8px 12px;
  font-weight: 700;
  letter-spacing: 1px;
}


/* ---------------------------------- */
/*        5. Page-Specific            */
/* ---------------------------------- */

/* --- Legal Pages (Privacy, Terms) --- */
.legal-page-container {
  padding-top: 120px; /* Offset for sticky header */
  padding-bottom: 60px;
  min-height: calc(100vh - 150px); /* Ensure it takes up space even with little content */
}
.legal-page-container h1 {
  color: var(--primary-color);
  margin-bottom: 2rem;
}
.legal-page-container h2 {
  color: var(--secondary-color);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* --- Success Page --- */
.success-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--bg-light);
}

.success-page-container .icon {
  color: var(--accent-color);
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  animation: popIn 0.5s ease-out forwards;
}

.success-page-container h1 {
    animation: fadeInDown 0.5s 0.2s ease-out forwards;
    opacity: 0;
}

.success-page-container p {
    animation: fadeInUp 0.5s 0.4s ease-out forwards;
    opacity: 0;
}

.success-page-container .btn-primary {
    animation: fadeInUp 0.5s 0.6s ease-out forwards;
    opacity: 0;
    margin-top: 2rem;
}

/* ---------------------------------- */
/*        6. Animations & Effects     */
/* ---------------------------------- */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add a subtle animation to elements with data-prompt for a modern feel */
[data-prompt] {
    transition: filter 0.5s ease;
}
[data-prompt]:hover {
    filter: brightness(1.05);
}