/* === BASE STYLES === */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
}

/* ==== LAYOUT UTILITIES === */
.container {
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1200px;
}

.wrapper {
    display: flex; 
    justify-content: space-around; 
    align-items: center;
}

.wrapper > div { width: 50%; }

.text-center { text-align: center; }

.text-left { text-align: left; }

.text-right { text-align: right; }

/* === SECTION STYLES === */
.section { padding: 6rem 0; }

.section-light { background: var(--color-background-light); }

.section-lighter { background: var(--color-background-lighter); }

.section-dark {
    background: var(--color-footer);
    color: white;
}

.section-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-footer) 100%);
    color: white;
}

/* ==== TYPOGRAPHY UTILITIES === */
.title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    border-radius: 2px;
}

.title-left::after {
    left: 0;
    transform: translateX(0);
}

.title-white { color: white; }

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subtitle-white { color: rgba(255, 255, 255, 0.9); }

.text-highlight {
    color: var(--color-secondary);
    font-weight: 600;
}

/* === BUTTON UTILITIES === */
.btn {
    background: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: var(--color-secondary);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 40, 39, 0.3);
}

.btn:active { transform: translateY(1px); }

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

.btn-secondary:hover { background: var(--color-primary); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

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

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-rounded { border-radius: 50px; }

/* Glass effect button */
.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: var(--color-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* === CARD UTILITIES === */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-padding { padding: 2rem; }

.card-padding-large { padding: 3rem 2rem; }

.card-centered { text-align: center; }

/* Feature card with hover effects */
.feature-card {
    padding: 2.5rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--color-primary);
    z-index: -1;
    transition: var(--transition);
    opacity: 0.05;
}

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

.feature-card:hover::before { height: 100%; }

.feature-card .icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .icon {
    color: var(--color-secondary);
    transform: scale(1.1);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.4rem;
    transition: var(--transition);
}

.feature-card:hover h3 { color: var(--color-secondary); }

.feature-card p { color: var(--color-text-light); }

/* === FORM UTILITIES === */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 53, 93, 0.1);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 4 5%27%3E%3Cpath fill=%27%23999%27 d=%27M2 0L0 2h4L2 0z%27/%3E%3C/svg%3E') no-repeat right 1.5rem center;
    background-size: 0.65rem;
    cursor: pointer;
}

.form {
    width: 90%;
    max-width: 600px;
    text-align: left;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* === GRID UTILITIES === */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }

.grid-3 { grid-template-columns: repeat(3, 1fr); }

.grid-4 { grid-template-columns: repeat(4, 1fr); }

.grid-gap-small { gap: 1rem; }

.grid-gap-large {
    gap: 3rem;
}

/* === FLEX UTILITIES === */
.flex { display: flex; }

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

.flex-column { flex-direction: column; }

.flex-wrap { flex-wrap: wrap; }

.flex-gap { gap: 1rem; }

.flex-gap-large { gap: 2rem; }

/* === MODAL UTILITIES === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.modal.active .modal-content { transform: translateY(0); }

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-size: 2rem;
    color: #cbd5e0;
    transition: var(--transition);
}

.modal .close:hover {
    color: var(--color-secondary);
    transform: rotate(90deg);
}

/* === NOTIFICATION UTILITIES === */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.notification.success {
    background-color: #2ecc71;
    opacity: 1;
    transform: translateY(0);
}

.notification.error {
    background-color: #e74c3c;
    opacity: 1;
    transform: translateY(0);
}

/* === ANIMATION UTILITIES === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--color-secondary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.05em;
    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(--color-secondary) }
}

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

.animate-fadeInUp { animation: fadeInUp 1s ease; }

.animate-delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animate-delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.animate-delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* === SPACING UTILITIES === */
.m-0 { margin: 0; }
.m-1 { margin: 1rem; }
.m-2 { margin: 2rem; }
.m-3 { margin: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 1rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }

/* === RESPONSIVE UTILITIES === */

@media screen and (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .hide-tablet { display: none; }
}

@media screen and (max-width: 768px) {
    .title { font-size: 2rem; }

    .wrapper { flex-direction: column; }

    .wrapper > div { width: 100%; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .flex-column-mobile { flex-direction: column;
    }
    
    .text-center-mobile { text-align: center; }
    
    .hide-mobile { display: none; }
    
    .form {
        padding: 1.5rem;
        width: 95%;
    }
}