/* Custom styles for Unidad Médica Berayah */

:root {
    --color-primary-light: #A8CF45;
    --color-primary-dark: #6E8C47;
    --color-primary-darker: #495939;
    --color-primary-light-bg: #cfe098;
    --color-foreground: #1a1a1a;
    --color-muted-foreground: #666666;
    --color-border: #e5e7eb;
    --color-white: #ffffff;
    --color-black: #000000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-foreground);
    background-color: var(--color-white);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1280px;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Typography */
.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-7xl {
    font-size: 4.5rem;
    line-height: 1;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-light {
    font-weight: 300;
}

/* Colors */
.text-foreground {
    color: var(--color-foreground);
}

.text-muted-foreground {
    color: var(--color-muted-foreground);
}

.text-white {
    color: var(--color-white);
}

.text-primary {
    color: var(--color-primary-dark);
}

.bg-primary {
    background-color: var(--color-primary-dark);
}

.bg-white {
    background-color: var(--color-white);
}

.bg-muted {
    background-color: #f3f4f6;
}

.border-border {
    border-color: var(--color-border);
}

/* Spacing */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.p-8 { padding: 2rem; }

/* Display */
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none; }
.inline-block { display: inline-block; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:grid { display: grid; }
    .md\:block { display: block; }
    .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
    .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:col-span-1 { grid-column: span 1 / span 1; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:order-2 { order: 2; }
    .md\:space-y-16 > * + * { margin-top: 4rem; }
    .md\:space-y-12 > * + * { margin-top: 3rem; }
}

/* Borders and Radius */
.border { border: 1px solid var(--color-border); }
.border-2 { border-width: 2px; }
.border-b { border-bottom: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

/* Transitions */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }
.transition-transform { transition: transform 0.2s ease; }

.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }
.duration-1000 { transition-duration: 1000ms; }

/* Hover effects */
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:text-primary:hover { color: var(--color-primary-dark); }
.hover\:bg-primary\/90:hover { background-color: rgba(110, 140, 71, 0.9); }
.hover\:bg-white\/10:hover { background-color: rgba(255, 255, 255, 0.1); }
.hover\:text-white:hover { color: var(--color-white); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Active effects */
.active\:scale-95:active { transform: scale(0.95); }

/* Focus effects */
.focus\:border-primary:focus {
    outline: none;
    border-color: var(--color-primary-dark);
}

.focus\:ring-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 207, 69, 0.1);
}

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-30 { opacity: 0.3; }
.opacity-50 { opacity: 0.5; }
.opacity-80 { opacity: 0.8; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.fixed { position: fixed; }

.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.bottom-8 { bottom: 2rem; }
.left-0 { left: 0; }
.left-1\/2 { left: 50%; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* Transform */
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-x-1\/2 { --tw-translate-x: -50%; }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

/* Width and Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-12 { width: 3rem; }
.w-1 { width: 0.25rem; }
.w-0 { width: 0; }

.h-screen { height: 100vh; }
.h-full { height: 100%; }
.h-12 { height: 3rem; }
.h-96 { height: 24rem; }
.h-0 { height: 0; }
.h-0\.5 { height: 0.125rem; }

.min-h-screen { min-height: 100vh; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Object fit */
.object-cover { object-fit: cover; }

/* Flex shrink */
.flex-shrink-0 { flex-shrink: 0; }

/* Sticky header */
header.sticky {
    top: 0;
    z-index: 50;
}

/* Gradient backgrounds */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-black\/50 {
    --tw-gradient-stops: rgba(0, 0, 0, 0.5);
}

.to-black\/30 {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(0, 0, 0, 0.3);
}

.from-primary\/5 {
    --tw-gradient-stops: rgba(110, 140, 71, 0.05);
}

.to-primary\/10 {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(110, 140, 71, 0.1);
}

.from-primary {
    --tw-gradient-stops: var(--color-primary-dark);
}

.to-primary\/30 {
    --tw-gradient-stops: var(--tw-gradient-from), rgba(110, 140, 71, 0.3);
}

/* Max width */
.max-w-2xl { max-w-42rem; }
.max-w-3xl { max-w-48rem; }
.max-w-4xl { max-w-56rem; }

/* Responsive text sizes */
@media (min-width: 768px) {
    .md\:text-4xl { font-size: 2.25rem; }
    .md\:text-5xl { font-size: 3rem; }
    .md\:text-7xl { font-size: 4.5rem; }
}

/* Responsive spacing */
@media (min-width: 768px) {
    .md\:mb-8 { margin-bottom: 2rem; }
    .md\:mb-12 { margin-bottom: 3rem; }
    .md\:mb-16 { margin-bottom: 4rem; }
    .md\:gap-8 { gap: 2rem; }
    .md\:gap-12 { gap: 3rem; }
    .md\:p-8 { padding: 2rem; }
}

/* Responsive display */
@media (max-width: 767px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

/* Input and button styles */
input[type="text"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(168, 207, 69, 0.1);
}

button {
    cursor: pointer;
    transition: all 0.2s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-maps {
    background-color: var(--color-primary-darker);
    color: var(--color-white) !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
    text-align: center;
}

.btn-maps:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn-maps:active {
    transform: translateY(0);
}

/* Utility classes for animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .contacto-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Link styles */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Placeholder text */
::placeholder {
    color: var(--color-muted-foreground);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .contacto-form {
        height: 100%;
    }
    .contacto-form > div {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    #contactForm {
        flex: 1;
        display: grid;
        grid-template-rows: 1fr auto 1fr;
        height: 100%;
        gap: 0;
    }
    .form-group-nombre {
        align-self: start;
        width: 100%;
        padding-top: 1.25rem;
    }
    .form-group-telefono {
        align-self: center;
        width: 100%;
    }
    .form-group-cta {
        align-self: end;
        width: 100%;
    }
    .form-btn-wrapper {
        margin-bottom: 20px;
    }
}
