/* Fonts */
:root {
    --font-playfair: 'Playfair Display', serif;
    --font-poppins: 'Poppins', sans-serif;
    --primary-color: #ed161b;
    --primary-dark: #02205c;
    --secondary-color: #02205c;
    --accent-color: #ed161b;
    --brand-red: #ed161b;
    --brand-red-soft: #fbe7e8;
    --brand-navy: #02205c;
    --brand-navy-deep: #011747;
}

* {
    font-family: var(--font-poppins);
}

.font-playfair {
    font-family: var(--font-playfair);
}

.font-poppins {
    font-family: var(--font-poppins);
}

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

/* Navbar Scroll Effect */
.navbar-scroll {
    transition: all 0.3s ease;
}

.navbar-scroll.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(30, 79, 134, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(2, 32, 92, 0.75);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
    opacity: 0;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.slide-in-down {
    animation: slideInDown 0.6s ease-out forwards;
    opacity: 0;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

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

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

.shimmer-animation {
    background: #e2e8f0;
    animation: pulse 2s ease-in-out infinite;
}

/* Stagger Animation */
.stagger-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--brand-navy);
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.8s ease-out;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 5;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Buttons */
.btn-primary {
    background: var(--brand-red);
    color: white;
    padding: 12px 30px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(2, 32, 92, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--brand-navy);
    padding: 12px 30px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--brand-navy);
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--brand-navy);
    color: white;
    transform: translateY(-2px);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1f2937;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-poppins);
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(30, 79, 134, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Success Message */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideInDown 0.4s ease-out;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: #e6eefc;
    color: #02143b;
    border-left: 4px solid var(--brand-navy);
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--brand-red);
}

.service-icon {
    font-size: 3rem;
    color: var(--brand-navy);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-slider {
        height: 400px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--brand-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Text Gradient */
.text-gradient {
    color: var(--brand-red);
}

/* Section Spacing */
.section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Brand overrides for existing Tailwind blue utility usage */

.bg-blue-600 {
    background-color: var(--brand-navy) !important;
}

.bg-blue-700 {
    background-color: var(--brand-navy-deep) !important;
}

.bg-blue-50 {
    background-color: var(--brand-red-soft) !important;
}

.text-blue-600 {
    color: var(--brand-red) !important;
}

.text-blue-400 {
    color: #7ca0eb !important;
}

.text-blue-100 {
    color: #f8dfe0 !important;
}

.border-blue-600 {
    border-color: var(--brand-red) !important;
}

.hover\:bg-blue-50:hover {
    background-color: var(--brand-red-soft) !important;
}

.hover\:bg-blue-700:hover {
    background-color: var(--brand-navy-deep) !important;
}

.hover\:text-blue-600:hover,
.hover\:text-blue-700:hover {
    color: var(--brand-red) !important;
}

.hover\:bg-blue-600:hover {
    background-color: var(--brand-navy) !important;
}

@media (max-width: 480px) {
    .hero-slider {
        height: 340px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mb-4 {
    margin-bottom: 1rem;
}

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

.mb-8 {
    margin-bottom: 2rem;
}

/* Final brand contrast and mobile polish */
body {
    color: #14213d;
}

h1,
h2,
h3,
h4,
.font-playfair {
    color: var(--brand-navy);
}

a {
    color: inherit;
}

a:hover {
    color: var(--brand-red);
}

.card {
    border: 1px solid rgba(2, 32, 92, 0.08);
}

.card:hover {
    border-color: rgba(237, 22, 27, 0.35);
}

.nav-link {
    font-weight: 600;
}

.nav-link:hover {
    color: var(--brand-red) !important;
}

.navbar-scroll {
    border-bottom: 1px solid rgba(2, 32, 92, 0.08);
}

footer.bg-gray-900 {
    background: var(--brand-navy-deep) !important;
}

footer .text-gray-400 {
    color: #c3cbe3 !important;
}

footer .border-gray-800 {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.bg-gray-50 {
    background-color: #fff8f8 !important;
}

.text-gray-900 {
    color: #10203d !important;
}

.text-gray-700 {
    color: #26344f !important;
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        border-radius: 10px;
    }

    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px;
    }

    .slider-arrow {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }
}